Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 1.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 1.76 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
services:
# MySQL Database
mysql:
image: mysql:8.0
container_name: lilo-stitch-db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
volumes:
- mysql_data:/var/lib/mysql
- ./message-app/database/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3307:3306"
networks:
app-network:
aliases:
- mysql
- db
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-prootpassword"]
timeout: 20s
retries: 10
interval: 5s
start_period: 30s
# Backend API
backend:
build:
context: ./message-app/backend
dockerfile: Dockerfile
container_name: lilo-stitch-backend
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
PORT: 3002
GAME_URL: ${GAME_URL}
ports:
- "3002:3002"
depends_on:
mysql:
condition: service_healthy
networks:
- app-network
restart: unless-stopped
# Landing Page
landing:
build:
context: ./message-app/landing
dockerfile: Dockerfile
container_name: lilo-stitch-landing
environment:
BACKEND_URL: ${BACKEND_URL}
GAME_URL: ${GAME_URL}
ports:
- "3000:80"
networks:
- app-network
restart: unless-stopped
# Game
game:
build:
context: ./myGame
dockerfile: Dockerfile
container_name: lilo-stitch-game
environment:
BACKEND_URL: ${BACKEND_URL}
GAME_URL: ${GAME_URL}
ports:
- "8080:80"
networks:
- app-network
restart: unless-stopped
networks:
app-network:
driver: bridge
volumes:
mysql_data: