-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yaml
68 lines (68 loc) · 1.65 KB
/
docker-compose.prod.yaml
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
63
64
65
66
67
68
version: "3.9"
services:
spacebarchat:
build:
context: .
dockerfile: Dockerfile-prod
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- spacebarchat-storage:/exec/persistent/storage
environment:
DATABASE: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DATABASE}
STORAGE_PROVIDER: "file"
STORAGE_LOCATION: "/exec/persistent/storage/"
PORT: "3001"
depends_on:
db:
condition: service_healthy
db:
image: postgres:15-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER:?err}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
- POSTGRES_DB=${POSTGRES_DATABASE:?err}
ports:
- '127.0.0.1:5432:5432'
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DATABASE} -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
nginx:
build:
context: .
dockerfile: Dockerfile-nginx
restart: unless-stopped
environment:
- NGINX_HOST=${NGINX_HOST:?err}
- MAIL_CERTBOT=${MAIL_CERTBOT:?err}
ports:
- "80:80"
- "443:443"
volumes:
- nginx-site:/etc/nginx/sites-enabled/
- letsencrypt-folder:/etc/letsencrypt
depends_on:
- spacebarchat
- spacebarchat-client
spacebarchat-client:
build:
context: .
dockerfile: Dockerfile-frontend
args:
- SERVER_URL=${NGINX_HOST:?err}
restart: unless-stopped
ports:
- "8080:80"
depends_on:
- spacebarchat
volumes:
spacebarchat-storage:
db:
nginx-site:
letsencrypt-folder: