-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (70 loc) · 1.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (70 loc) · 1.54 KB
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
69
70
71
72
73
74
75
version: '3.8'
services:
postgres:
image: postgis/postgis:16-3.4
environment:
POSTGRES_USER: trybe
POSTGRES_PASSWORD: trybe_dev
POSTGRES_DB: trybe
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U trybe"]
interval: 5s
timeout: 5s
retries: 5
networks:
- trybe-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
expose:
- "3000"
environment:
PORT: 3000
NODE_ENV: production
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: trybe
DB_PASSWORD: trybe_dev
DB_NAME: trybe
FIREBASE_PROJECT_ID: ${FIREBASE_PROJECT_ID}
FIREBASE_CLIENT_EMAIL: ${FIREBASE_CLIENT_EMAIL}
FIREBASE_PRIVATE_KEY: ${FIREBASE_PRIVATE_KEY}
depends_on:
postgres:
condition: service_healthy
networks:
- trybe-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: unless-stopped
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "80:80"
# depends_on:
# backend:
# condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
networks:
- trybe-network
volumes:
pgdata:
networks:
trybe-network:
driver: bridge