-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.06 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.06 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
services:
api:
build:
context: ./apps/api
dockerfile: Dockerfile
ports:
- ${PORT:-3000}:3000
restart: unless-stopped
environment:
PORT: 3000
DATABASE_URL: mysql://${DB_USER:-admin}:${DB_PASSWORD:-admin}@db:3306/${DB_NAME:-mydb}
JWT_SECRET: ${JWT_SECRET:-secret}
healthcheck:
test: [ "CMD", "lsof", "-t", "-i:3000" ]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
depends_on:
networks:
- app_net
web:
build:
context: ./apps/web
dockerfile: Dockerfile
container_name: web
ports:
- ${PORT:-3002}:3000
restart: unless-stopped
environment:
PORT: 3000
NEXT_PUBLIC_API_URL: ${API_URL:-http://api:3000}
API_URL: ${API_URL:-http://api:3000}
healthcheck:
test: [ "CMD", "lsof", "-t", "-i:3000" ]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
networks:
- app_net
depends_on:
api:
condition: service_healthy
networks:
app_net:
driver: bridge