-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-actions.yml
More file actions
96 lines (91 loc) Β· 2.2 KB
/
Copy pathdocker-compose-actions.yml
File metadata and controls
96 lines (91 loc) Β· 2.2 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
mysql:
container_name: mysql-container
image: mysql:8.0
volumes:
- db-volume:/var/lib/mysql
env_file:
- .env
networks:
- db-network
ports:
- "${DATABASE_PORT}:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 15s
timeout: 10s
retries: 5
start_period: 40s
redis:
container_name: redis-container
image: redis:latest
volumes:
- redis-volume:/data
command: ["redis-server", "--appendonly", "yes"]
env_file:
- .env
networks:
- cache-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
api:
container_name: api-container
build:
context: ./backend
cache_to:
- type=local,dest=/tmp/.buildx-cache/api,mode=max
cache_from:
- type=local,src=/tmp/.buildx-cache/api
image: ${DOCKER_REGISTRY}/swimdone-api-image:latest
env_file:
- .env
networks:
- db-network
- cache-network
- web-network
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
client:
container_name: client-container
build:
context: ./frontend
cache_to:
- type=local,dest=/tmp/.buildx-cache/client,mode=max
cache_from:
- type=local,src=/tmp/.buildx-cache/client
args:
VITE_DOMAIN: ${VITE_DOMAIN}
VITE_KAKAOMAP_API_KEY: ${VITE_KAKAOMAP_API_KEY}
VITE_API_URL: ${VITE_API_URL}
image: ${DOCKER_REGISTRY}/swimdone-client-image:latest
env_file:
- .env
environment:
- VITE_DOMAIN=${VITE_DOMAIN}
- API_SERVER_URL=${API_SERVER_URL}
volumes:
- /etc/letsencrypt/live/${VITE_DOMAIN}/privkey.pem:/etc/letsencrypt/live/${VITE_DOMAIN}/privkey.pem:ro
- /etc/letsencrypt/live/${VITE_DOMAIN}/fullchain.pem:/etc/letsencrypt/live/${VITE_DOMAIN}/fullchain.pem:ro
ports:
- "80:80"
- "443:443"
networks:
- web-network
depends_on:
- api
volumes:
db-volume:
redis-volume:
networks:
db-network:
cache-network:
web-network: