Skip to content

Commit

Permalink
fix: dependecies
Browse files Browse the repository at this point in the history
ref: #392
  • Loading branch information
Apoorva64 committed Jun 16, 2023
1 parent 7ebd073 commit 732d5f2
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 20 deletions.
2 changes: 1 addition & 1 deletion ops/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ NODE_ENV=production
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
POSTGRES_PORT=5432
POSTGRES_HOST=localhost
POSTGRES_HOST=postgres
POSTGRES_USER=postgres
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public"
48 changes: 39 additions & 9 deletions ops/docker-compose-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ services:
build:
context: ../
dockerfile: ./apps/backend/api/Dockerfile
ports:
- '8000:3000'
env_file:
- .env
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
- PORT=3000
- NODE_ENV=production
- HOST=0.0.0.0
depends_on:
postgres:
condition: service_healthy
webonjour-seeder:
condition: service_completed_successfully

healthcheck:
start_period: 10s
Expand All @@ -54,11 +53,19 @@ services:
BACK_OFFICE_DOMAIN: reverse-proxy/back
API_DOMAIN: reverse-proxy
SECURE: 'false'
ports:
- '4200:8080'
depends_on:
api:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'wget',
'--tries=3',
'--quiet',
'--spider',
'http://localhost:8080/',
]

front-end-front-office:
image: ghcr.io/2019-2020-ps6/2022-2023-ps6-webonjour/front-end-front-office
Expand All @@ -71,11 +78,19 @@ services:
BACK_OFFICE_DOMAIN: reverse-proxy/back
API_DOMAIN: reverse-proxy
SECURE: 'false'
ports:
- '4201:8080'
depends_on:
api:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'wget',
'--tries=3',
'--quiet',
'--spider',
'http://localhost:8080/',
]

reverse-proxy:
image: nginx:1.21.1-alpine
Expand All @@ -85,6 +100,15 @@ services:
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
front-end-back-office:
condition: service_healthy
front-end-front-office:
condition: service_healthy
api:
condition: service_healthy
webonjour-seeder:
condition: service_completed_successfully

webonjour-seeder:
image: ghcr.io/2019-2020-ps6/2022-2023-ps6-webonjour/util-scripts
Expand All @@ -95,8 +119,8 @@ services:
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
env_file:
- .env

e2e:
image: ghcr.io/2019-2020-ps6/2022-2023-ps6-webonjour/back-office-e2e
Expand All @@ -112,6 +136,12 @@ services:
depends_on:
api:
condition: service_healthy
front-end-back-office:
condition: service_healthy
front-end-front-office:
condition: service_healthy
webonjour-seeder:
condition: service_completed_successfully
environment:
- NODE_ENV=production

Expand Down
43 changes: 33 additions & 10 deletions ops/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ services:
build:
context: ../
dockerfile: ./apps/backend/api/Dockerfile
ports:
- '8000:3000'
env_file:
- .env
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
- PORT=3000
- NODE_ENV=production
- HOST=0.0.0.0
depends_on:
postgres:
condition: service_healthy
webonjour-seeder:
condition: service_completed_successfully

healthcheck:
start_period: 10s
Expand All @@ -54,11 +53,19 @@ services:
BACK_OFFICE_DOMAIN: localhost/back
API_DOMAIN: localhost
SECURE: 'false'
ports:
- '4200:8080'
depends_on:
api:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'wget',
'--tries=3',
'--quiet',
'--spider',
'http://localhost:8080/',
]

front-end-front-office:
image: ghcr.io/2019-2020-ps6/2022-2023-ps6-webonjour/front-end-front-office
Expand All @@ -71,11 +78,19 @@ services:
BACK_OFFICE_DOMAIN: localhost/back
API_DOMAIN: localhost
SECURE: 'false'
ports:
- '4201:8080'
depends_on:
api:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'wget',
'--tries=3',
'--quiet',
'--spider',
'http://localhost:8080/',
]

reverse-proxy:
image: nginx:1.21.1-alpine
Expand All @@ -85,6 +100,15 @@ services:
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
front-end-back-office:
condition: service_healthy
front-end-front-office:
condition: service_healthy
api:
condition: service_healthy
webonjour-seeder:
condition: service_completed_successfully

webonjour-seeder:
image: ghcr.io/2019-2020-ps6/2022-2023-ps6-webonjour/util-scripts
Expand All @@ -95,8 +119,7 @@ services:
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres

env_file:
- .env
volumes:
postgres:

0 comments on commit 732d5f2

Please sign in to comment.