forked from serversideup/financial-freedom
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yml
93 lines (86 loc) · 2.55 KB
/
docker-compose.dev.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
version: '3.7'
services:
traefik:
networks:
- web-dev
ports:
# Listen on port 80, default for HTTP, necessary to redirect to HTTPS
- target: 80
published: 80
mode: host
# Listen on port 443, default for HTTPS
- target: 443
published: 443
mode: host
- target: 8080
published: 8080
mode: host
volumes:
# Add Docker as a mounted volume, so that Traefik can read the labels of other services
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./_volumes/traefik/traefik.yml:/traefik.yml:ro
- ./_volumes/traefik/traefik-certs.yml:/traefik-certs.yml
- ./_volumes/traefik/certificates/:/certificates
mariadb:
hostname: "financial-freedom_mariadb"
networks:
- web-dev
environment:
MYSQL_ROOT_PASSWORD: "rootpassword"
MARIADB_DATABASE: "financial_freedom"
MARIADB_USER: "financial_freedom_database_user"
MARIADB_PASSWORD: "financial_freedom_database_password"
volumes:
# Add volume for all database files
- ./_volumes/mysql/database_data/:/var/lib/mysql
# Add volume for custom configurations
- ./_volumes/mysql/conf.d/:/etc/mysql/conf.d
- ./_volumes/mysql/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d
ports:
- target: 3306
published: 3306
mode: host
php:
networks:
- web-dev
volumes:
- .:/var/www/html/:cached
environment:
AUTORUN_ENABLED: false
depends_on:
- "mariadb"
- "traefik"
labels:
- "traefik.enable=true"
- "traefik.http.routers.financial-freedom.rule=Host(`financial-freedom.dev.test`)"
- "traefik.http.routers.financial-freedom.entrypoints=websecure"
- "traefik.http.routers.financial-freedom.tls=true"
- "traefik.http.services.financial-freedom.loadbalancer.server.port=443"
- "traefik.http.services.financial-freedom.loadbalancer.server.scheme=https"
node:
networks:
- web-dev
volumes:
- .:/usr/src/app/:cached
working_dir: /usr/src/app/
meilisearch:
networks:
- web-dev
hostname: "financial-freedom_meilisearch"
volumes:
- ./_volumes/meilisearch/meilisearch_data:/meili_data:cached
depends_on:
- "mariadb"
- "php"
redis:
hostname: "financial-freedom_redis"
networks:
- web-dev
volumes:
- ./_volumes/redis/data:/data:cached
depends_on:
- "mariadb"
- "php"
command: "redis-server --appendonly yes --requirepass redispassword"
networks:
web-dev: