-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yml
62 lines (58 loc) · 1.74 KB
/
docker-compose.production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
services:
prodDB:
image: postgres:15-alpine
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD:-postgres}
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_DB=${DB_NAME:-postgres}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5432:5432
volumes:
- prodDB:/var/lib/postgresql/data
server:
depends_on:
prodDB:
condition: service_healthy
environment:
- NODE_ENV=${NODE_ENV:-production}
- DB_HOST=${DB_HOST:-prodDB}
- DB_USER=${DB_USER:-postgres}
- DB_PASSWORD=${DB_PASSWORD:-postgres}
- DB_NAME=${DB_NAME:-postgres}
- SERVER_HOST=${SERVER_HOST:-localhost}
- SERVER_PORT=${SERVER_PORT:-4000}
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:-http://localhost:8000}
- ADMIN_EMAIL_ADRESS=${ADMIN_EMAIL_ADRESS}
- AUTH_DOMAIN_USERNAME=${AUTH_DOMAIN_USERNAME}
- AUTH_DOMAIN_PASSWORD=${AUTH_DOMAIN_PASSWORD}
- AUTH_DOMAIN_HOST=${AUTH_DOMAIN_HOST}
- AUTH_DOMAIN_PORT=${AUTH_DOMAIN_PORT}
image: arnaudlyard/portfolio-server
healthcheck:
test: 'curl --fail --request GET -H ''content-type:application/json'' --url ''http://localhost:4000/graphql?query=%7B__typename%7D'''
interval: 5s
timeout: 5s
retries: 10
client:
image: arnaudlyard/portfolio-client
nginx:
image: nginx:1.21.3
depends_on:
client:
condition: service_started
server:
condition: service_healthy
restart: always
ports:
- ${GATEWAY_PORT:-8000}:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./logs:/var/log/nginx
volumes:
prodDB: