-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
executable file
·88 lines (83 loc) · 2.27 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
services:
# Frontend Vue service
mythicalclient_frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mythicalclient_frontend
restart: unless-stopped
volumes:
- ./frontend:/app
- /app/node_modules
- ./frontend.conf:/etc/nginx/conf.d/default.conf
networks:
- mythicalclient_network
# PHP Backend service with PHP-FPM
mythicalclient_backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mythicalclient_backend
restart: unless-stopped
volumes:
- ./backend:/var/www/html
- ./backend/storage/packages:/var/www/html/storage/packages
depends_on:
- mythicalclient_database
- mythicalclient_redis
networks:
- mythicalclient_network
# Main Nginx service
mythicalclient_nginx:
image: nginx:alpine
container_name: mythicalclient_nginx
restart: unless-stopped
ports:
- "9271:80"
volumes:
- ./backend:/var/www/html
- ./backend.conf:/etc/nginx/conf.d/default.conf
depends_on:
- mythicalclient_frontend
- mythicalclient_backend
networks:
- mythicalclient_network
mythicalclient_database:
image: mariadb:latest
restart: unless-stopped
container_name: mythicalclient_database
volumes:
- ./dockerfiles/mariadb/data:/var/lib/mysql/
env_file:
- ./backend/storage/.env
environment:
MARIADB_ROOT_PASSWORD: "superlongquiery!!password"
MARIADB_DATABASE: ${DATABASE_DATABASE}
MARIADB_USER: ${DATABASE_USER}
MARIADB_PASSWORD: ${DATABASE_PASSWORD}
healthcheck:
test: mariadb-admin ping
interval: 5s
timeout: 5s
retries: 20
networks:
- mythicalclient_network
mythicalclient_redis:
image: redis:7.0-alpine
container_name: mythicalclient_redis
restart: unless-stopped
command: redis-server --save 60 1 --loglevel notice --requirepass '${REDIS_PASSWORD}'
env_file:
- ./backend/storage/.env
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck:
test: redis-cli -a $$REDIS_PASSWORD ping | grep PONG
interval: 5s
timeout: 5s
retries: 20
networks:
- mythicalclient_network
networks:
mythicalclient_network:
driver: bridge