-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (49 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
53 lines (49 loc) · 1.26 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
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: message-translator-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
MYSQL_DATABASE: ${MYSQL_DATABASE:-translator_db}
MYSQL_USER: ${MYSQL_USER:-translator}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-translator_password}
volumes:
- mysql-data:/var/lib/mysql
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-rootpassword}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
message-translator:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/${GITHUB_REPOSITORY:-username/message_translator}:latest
container_name: message-translator
restart: unless-stopped
ports:
- "3000:3000"
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- app-network
volumes:
mysql-data:
driver: local
networks:
app-network:
driver: bridge