-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
61 lines (57 loc) · 1.35 KB
/
docker-compose.yml
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
version: "3"
services:
nginx:
image: nginx:1.25
ports:
- 80:80
volumes:
- ./etc/nginx/dev/conf.d:/etc/nginx/conf.d
- ./backend/public:/var/www/public
depends_on:
- backend
- frontend
database:
image: mysql:8.1
ports:
- 3306:3306
volumes:
- ./etc/mysql/conf.d:/etc/mysql/conf.d
- ./etc/mysql/dbdata:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 5
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
backend:
image: golang:1.20
build:
context: ./backend
target: dev
volumes:
- ./backend:/app
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
depends_on:
database:
condition: service_healthy
frontend:
image: node:18
build:
context: ./frontend
target: dev
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
volumes:
dbdata: