-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 1.61 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
version: '3'
services:
# Webserver
webserver:
container_name: ${PROJECT_ID}-webserver
image: nginx:latest
restart: unless-stopped
tty: true
ports:
- "${SERVER_PORT}:80"
environment:
- SERVER_NAME=${SERVER_NAME}
volumes:
- ./conf/nginx.conf.template:/etc/nginx/templates/default.conf.template:ro
- ./flarum:/var/www/html
depends_on:
- app
networks:
- flarum
# Flarum
app:
container_name: ${PROJECT_ID}-app
image: flarumdev:latest
build:
context: .
dockerfile: ./Dockerfile
environment:
- APP_URL=http://${SERVER_NAME}:${SERVER_PORT}
env_file:
- .env
ports:
- "9000:9000"
restart: unless-stopped
tty: true
volumes:
- ./conf/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./conf/php.ini:/usr/local/etc/php/php.ini:ro
- ./flarum:/var/www/html:cached
- ./workbench:/var/www/workbench:cached
- ./framework:/var/www/framework:cached
links:
- db
depends_on:
- db
networks:
- flarum
# Database
db:
container_name: ${PROJECT_ID}-db
platform: linux/x86_64
image: ${DB_ENGINE_IMAGE}
ports:
- "${DB_PORT}:${DB_PORT}"
expose:
- "${DB_PORT}"
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_TCP_PORT: ${DB_PORT}
volumes:
- db-data:/var/lib/mysql:delegated
networks:
- flarum
networks:
flarum:
driver: bridge
volumes:
db-data: