-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (59 loc) · 1.36 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
version: '3.9'
services:
db:
image: mysql:8.0
container_name: tinygithub-mysql
ports:
- "3306:3306"
cap_add:
- SYS_NICE
restart: always
environment:
- MYSQL_ROOT_USER=${MYSQL_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
interval: 3s
timeout: 3s
retries: 10
tinygithub:
build:
context: .
dockerfile: Dockerfile
container_name: tinygithub
ports:
- "8083:8083"
restart: always
depends_on:
db:
condition: service_healthy
environment:
- DB_IP=db
- DB_USER=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
- STORAGE=${STORAGE}
- SERVER_IP=${SERVER_IP}
- LOG_LEVEL=debug
healthcheck:
test: [ "CMD", "curl", "localhost:8083" ]
interval: 5s
timeout: 3s
retries: 5
nginx:
image: nginx:latest
container_name: tinygithub-nginx
ports:
- "80:80"
restart: always
depends_on:
tinygithub:
condition: service_healthy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./build/tinygithub-frontend/dist:/usr/share/nginx/html
volumes:
db:
driver: local