-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.51 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: aha-postgres
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
ports:
- "${DB_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- aha-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile
container_name: aha-backend
ports:
- "3000:3000"
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE: ${DB_DATABASE}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
NODE_ENV: ${NODE_ENV}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
SMTP_FROM: ${SMTP_FROM}
APP_URL: ${APP_URL}
depends_on:
postgres:
condition: service_healthy
networks:
- aha-network
restart: unless-stopped
frontend:
build:
context: ./client
dockerfile: Dockerfile
container_name: aha-frontend
ports:
- "8080:3000"
environment:
REACT_APP_API_URL: ${APP_URL}
depends_on:
- backend
networks:
- aha-network
restart: unless-stopped
volumes:
postgres_data:
networks:
aha-network:
driver: bridge