-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
39 lines (37 loc) · 987 Bytes
/
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
version: '3'
services:
mysqldb:
image: mysql:8.2.0
restart: unless-stopped
env_file: .env
environment:
- MYSQL_ROOT_PASSWORD=$MYSQLDB_ROOT_PASSWORD
- MYSQL_DATABASE=$MYSQLDB_DATABASE
ports:
- $MYSQLDB_PORT:3306
volumes:
- db:/var/lib/mysql
app:
depends_on:
- mysqldb
build: .
restart: unless-stopped
env_file: .env
ports:
- $PORT:8080
environment:
- DATABASE_ADDR=mysqldb
- DATABASE_USER=$MYSQLDB_USER
- DATABASE_PASSWORD=$MYSQLDB_ROOT_PASSWORD
- DATABASE_NAME=$MYSQLDB_DATABASE
- DATABASE_PORT=3306
stdin_open: true
tty: true
labels:
- "traefik.enable=true"
- "traefik.http.routers.etoken_api.rule=Host(`${TRAEFIK_HOST}`)"
- "traefik.http.routers.etoken_api.entrypoints=websecure"
- "traefik.http.routers.etoken_api.tls.certresolver=myresolver"
- "traefik.http.routers.etoken_api.middlewares=SecHeader@file"
volumes:
db: