-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (90 loc) · 2.83 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: "3.5"
services:
php:
build:
context: docker/${CFG_PHP:-php}
dockerfile: Dockerfile
container_name: emailer-php
working_dir: /app
volumes:
- ./:/app
environment:
- ENV=${ENV}
- DEBUG_MODE=${DEBUG_MODE}
- APPLICATION_HOST=${APPLICATION_HOST}
- EMAILER_API=${EMAILER_API}
- SWAGGER_UI=${SWAGGER_UI}
- MARIADB_HOST=emailer-mariadb
- MARIADB_PORT=3306
- MARIADB_DATABASE=${MARIADB_DATABASE:-emailer}
- MARIADB_USER=${MARIADB_USER:-emailer}
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
- REDIS_HOST=emailer-redis
- REDIS_PORT=6379
ports:
- "${PORT_PHP:-10002}:9000"
restart: "no"
networks:
- default
mariadb:
image: mariadb:10.5
container_name: emailer-mariadb
working_dir: /backup
volumes:
- mydb:/var/lib/mysql
- ./docker/backup_db:/backup
- ./docker/${CFG_DB:-mariadb}/mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf
#- ./docker/${CFG_DB:-mariadb}/50-mysqld_safe.cnf:/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf
environment:
MARIADB_DATABASE: ${MARIADB_DATABASE:-emailer}
MARIADB_USER: ${MARIADB_USER:-emailer}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
ports:
- "${PORT_DB:-10003}:3306"
restart: "no"
networks:
- default
nginx:
image: nginx:latest
container_name: emailer-nginx
working_dir: /app
volumes:
- ./public:/app
- ./docker/${CFG_NGINX:-nginx}/default.conf:/etc/nginx/conf.d/default.conf
- ./docker/${CFG_NGINX:-nginx}/static_params:/etc/nginx/static_params
- ./docker/${CFG_NGINX:-nginx}/fpm_params:/etc/nginx/fpm_params
- ./docker/${CFG_NGINX:-nginx}/ssl:/etc/nginx/ssl
environment:
- ENV=${ENV}
- APPLICATION_HOST=${APPLICATION_HOST}
ports:
- "${PORT_HTTP:-82}:80"
- "${PORT_HTTPS:-83}:443"
restart: "no"
networks:
- default
depends_on:
- php
redis:
image: redis:alpine
container_name: emailer-redis
restart: "on-failure"
networks:
- default
# swagger-ui:
# image: swaggerapi/swagger-ui
# container_name: "swagger-ui"
# ports:
# - "8082:8080"
# volumes:
# - ./swagger/openapi.json:/openapi.json
# environment:
# SWAGGER_JSON: /openapi.json
# # API_URL: ""
volumes:
mydb:
name: emailer-mydb
networks:
default:
name: default-network