-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
46 lines (46 loc) · 1.38 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
version: "3.8"
networks:
prod-shared:
volumes:
mysql_data:
services:
trc:
container_name: ${CONTAINER}
hostname: ${HOSTNAME} #nginx uses hostname to proxy
image: ${IMAGEURL}:${IMAGETAG}
pull_policy: always
restart: always
depends_on:
- mysql
logging:
driver: "local"
options: {}
working_dir: /app
ports:
- '8080:80'
networks:
- prod-shared
environment:
PMA_HOST: ${MYSQL_HOSTNAME}
PMA_PORT: ${MYSQL_DATABASE_PORT}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
mysql:
container_name: ${MYSQL_CONTAINER_NAME}
hostname: ${MYSQL_HOSTNAME}
image: mysql:8.0.32
pull_policy: always
restart: always
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER} #user granted access to database on import
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE_PORT: ${MYSQL_DATABASE_PORT}
volumes:
- ./trc.sql:/docker-entrypoint-initdb.d/trc.sql #automagically imports any sql files in this folder
logging:
driver: "local"
options: {}
networks:
- prod-shared