Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make frontend docker config more configurable #281

Merged
merged 3 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ DB_PORT=5432
# PGADMIN admin user
[email protected]
PGADMIN_PASSWORD=root

# Frontend
ESID_PORT=8080
ESID_BRANCH=latest
3 changes: 2 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ ENV PYTHONUNBUFFERED 1
RUN set -x && \
apt-get update && \
apt -f install && \
apt-get -qy install netcat && \
apt-get -qy install netcat-traditional && \
rm -rf /var/lib/apt/lists/* && \
wget -O /wait-for https://raw.githubusercontent.com/eficode/wait-for/master/wait-for && \
chmod +x /wait-for

CMD ["sh", "/entrypoint-startup.sh"]
COPY ./docker/entrypoint-startup.sh /

COPY ./.env ./.env
COPY ./requirements ./requirements

RUN pip install numpy scipy pandas tqdm
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- db

frontend:
image: esid/frontend:latest
image: esid/frontend:${ESID_BRANCH}
restart: always
build:
context: frontend/
Expand All @@ -56,7 +56,7 @@ services:
PROXY_PORT: 8000
HOST: ${HOST}
ports:
- 8080:80
- ${ESID_PORT}:80
depends_on:
- backend

Expand Down
3 changes: 3 additions & 0 deletions frontend/.env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ PROXY_HOST=http://localhost
API_URL=

HOST=localhost

ESID_PORT=8080
ESID_BRANCH=latest
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app
#copy all the folder contents from local to container
COPY . .

COPY ./.env.docker ./.env
COPY ./.env ./.env

#Run command npm install to install packages
RUN npm ci
Expand Down
6 changes: 3 additions & 3 deletions frontend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3.9'
version: '3.7'
services:
frontend:
build:
context: .
dockerfile: Dockerfile
image: esid/frontend:latest
image: esid/frontend:${ESID_BRANCH}
environment:
HOST: ${HOST}
API_URL: ${API_URL}
PROXY_HOST: ${PROXY_HOST}
PROXY_PORT: ${PROXY_PORT}
ports:
- '8080:80'
- ${ESID_PORT}:80
Loading