-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose-prod.yml
47 lines (44 loc) · 1.82 KB
/
docker-compose-prod.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
version: "3.8"
services:
app_prod:
build:
context: .
dockerfile: Dockerfile
target: production
environment:
MODE: ${PROD_MODE:-DEV}
BINDING: "0.0.0.0"
POSTGRES_DATABASE: ${POSTGRES_PROD_DB}
POSTGRES_HOST: ${POSTGRES_PROD_HOST:-postgres_prod}
POSTGRES_PASSWORD: ${POSTGRES_PROD_PASSWORD}
POSTGRES_PORT: ${POSTGRES_PROD_PROD_PORT:-5432}
POSTGRES_SSL: ${POSTGRES_PROD_SSL:-true}
POSTGRES_SSL_REJECT_UNAUTHORIZED: ${POSTGRES_PROD_SSL_REJECT_UNAUTHORIZED:-false}
POSTGRES_USER: ${POSTGRES_PROD_USER:-teammapper-user}
POSTGRES_QUERY_TIMEOUT: ${POSTGRES_QUERY_TIMEOUT:-100000}
POSTGRES_STATEMENT_TIMEOUT: ${POSTGRES_STATEMENT_TIMEOUT:-100000}
DELETE_AFTER_DAYS: ${DELETE_AFTER_DAYS:-30}
ports:
- "${APP_PROD_PORT:-80}:3000"
depends_on:
- postgres_prod
postgres_prod:
image: postgres:12-alpine
# Pass config parameters to the postgres server.
# Find more information below when you need to generate the ssl-relevant file your self
command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_DB: ${POSTGRES_PROD_DB}
POSTGRES_PASSWORD: ${POSTGRES_PROD_PASSWORD}
POSTGRES_PORT: ${POSTGRES_PROD_PORT:-5432}
POSTGRES_USER: ${POSTGRES_PROD_USER}
volumes:
# To setup an ssl-enabled postgres server locally, you need to generate a self-signed ssl certificate.
# See README.md for more information.
# Mount the ssl_cert_file and ssl_key_file into the docker container.
- ./ca/server.crt:/var/lib/postgresql/server.crt
- ./ca/server.key:/var/lib/postgresql/server.key
- postgres_prod_data:/var/lib/postgresql/data/pgdata
volumes:
postgres_prod_data: