forked from 7Cav/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
69 lines (64 loc) · 1.29 KB
/
docker-compose.yaml
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
version: '3'
services:
api:
build:
dockerfile: "Dockerfile"
context: "./"
image: 7cav/api:latest
container_name: go-api
networks:
- api
depends_on:
- database
- nginx
ports:
- "11000:11000"
- "10000:10000"
environment:
PORT: 10000
DB_USERNAME:
DB_PASSWORD:
DB_HOST:
DB_PORT:
nginx:
networks:
- api
image: nginx:1.19-alpine
container_name: api-nginx
ports:
- "8080:80"
- "4443:443"
restart: always
volumes:
- api-nginx-conf:/etc/nginx/conf.d/
# use `make certs` to generate self-signed certs for nginx TLS
- ./out:/out
database:
container_name: xenforo-db
networks:
- api
healthcheck:
test: mysqladmin --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD ping
interval: 15s
timeout: 10s
retries: 3
restart: always
image: mariadb:10.3
ports:
- "3306:3306"
volumes:
- xenforo-database:/var/lib/mysql
environment:
MYSQL_DATABASE: xenforo
MYSQL_USER: xenforo
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: root_password
volumes:
xenforo-database:
api-nginx-conf:
driver_opts:
type: none
o: bind
device: $PWD/docker/nginx/
networks:
api: