forked from LiteFarmOrg/LiteFarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
50 lines (48 loc) · 1.11 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
48
49
50
version: "3.7"
volumes:
postgres-data:
driver: local
services:
db:
container_name: litefarm-db
image: postgres:13
ports:
- "5433:5432"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ~/docker/volumes/postgres:/var/lib/postgresql/data
backend:
container_name: litefarm-api
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
build:
context: ./packages/
dockerfile: ./api/prod.Dockerfile
volumes:
- /etc/letsencrypt:/usr/src/letsencrypt
ports:
- "5000:5000"
environment:
WAIT_HOSTS: litefarm-db:5432
NODE_ENV: production
DATABASE_URL: ${DATABASE_URL}
frontend:
container_name: litefarm-web
build:
context: ./packages/
dockerfile: ./webapp/prod.Dockerfile
volumes:
- /etc/letsencrypt:/etc/letsencrypt
ports:
- "80:80"
- "443:443"