-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
91 lines (85 loc) · 2.85 KB
/
docker-compose.prod.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
version: '3.7'
services:
# APPLICATION
application:
container_name: miniserver-application
build:
context: .
dockerfile: .docker/prod/Dockerfile
args:
BACKEND_PREFIX: ${API_PREFIX:-/api}
environment:
# Container specific environment variables
TZ: ${APP_TZ:-UTC}
PHP_DATE_TIMEZONE: ${APP_TZ:-UTC}
# Application specific environment variables
FB_APP_PARAMETER__DATABASE_HOST: database
FB_APP_PARAMETER__DATABASE_PORT: 3306
FB_APP_PARAMETER__DATABASE_USERNAME: ${DATABASE_USERNAME:-miniserver}
FB_APP_PARAMETER__DATABASE_PASSWORD: ${DATABASE_PASSWORD:-miniserver}
FB_APP_PARAMETER__DATABASE_DBNAME: ${DATABASE_DBNAME:-fb_miniserver}
FB_APP_PARAMETER__REDIS_HOST: redis
FB_APP_PARAMETER__REDIS_PORT: 6379
FB_APP_PARAMETER__SECURITY_SIGNATURE: ${SECURITY_SIGNATURE}
FB_APP_PARAMETER__API_PREFIX: ${API_PREFIX:-/api}
FB_APP_PARAMETER__API_PREFIXED_MODULES: ${API_PREFIXED_MODULES:-true}
FB_APP_PARAMETER__API_KEY: ${API_KEY:-}
volumes:
- ./config:/app/config:rw
- ./var:/app/var:rw
ports:
- "${HTTP_PORT:-80}:80"
- "${WORKER_STATUS_PORT:-9001}:9001"
networks:
- fastybird
# MYSQL DATABASE STORAGE
database:
container_name: miniserver-database
image: mariadb
environment:
# Container specific environment variables
TZ: ${APP_TZ:-UTC}
MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD:-root}
MYSQL_USER: ${DATABASE_USERNAME:-miniserver}
MYSQL_PASSWORD: ${DATABASE_PASSWORD:-miniserver}
MYSQL_DATABASE: ${DATABASE_DBNAME:-fb_miniserver}
volumes:
- mysql-data:/var/lib/mysql:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/mysql/data:/var/lib/mysql:rw,delegated
networks:
- fastybird
# REDIS STORAGE
redis:
container_name: miniserver-redis
image: redis
volumes:
- redis-other:/var/lib/redis:rw
- redis-data:/data:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/redis/other:/var/lib/redis:rw,delegated
# - ./docker/redis/data:/data:rw,delegated
networks:
- fastybird
# MQTT
mqtt:
container_name: miniserver-mqtt
image: eclipse-mosquitto
volumes:
- mqtt-data:/mosquitto/data:rw
- mqtt-log:/mosquitto/log:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/mqtt/data:/mosquitto/data:rw,delegated
ports:
- "${MQTT_PORT:-1883}:1883"
networks:
- fastybird
networks:
fastybird:
driver: bridge
volumes:
mysql-data:
redis-other:
redis-data:
mqtt-data:
mqtt-log: