-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (85 loc) · 2.09 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
services:
mariadb:
build: ./.docker/mariadb
image: ${PROJECT_NAME}-mariadb
container_name: ${PROJECT_NAME}-mariadb
env_file:
- ./.env
ports:
- ${_MARIADB_HOST_PORT}:${DB_PORT}
volumes:
- ./.docker/.mariadb:/var/lib/mysql
- ./app:/app
working_dir: /app
healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
restart: always
php-fpm:
build: ./.docker/php/fpm
image: ${PROJECT_NAME}-php-fpm
container_name: ${PROJECT_NAME}-php-fpm
env_file:
- ./.env
volumes:
- ./.docker/php/fpm/php.ini:/usr/local/etc/php/php.ini
- ./.docker/php/fpm/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- ./app:/app
depends_on:
mariadb:
condition: service_healthy
working_dir: /app
user: 1000:1000
restart: always
cron:
pull_policy: never
image: ${PROJECT_NAME}-php-fpm
container_name: ${PROJECT_NAME}-cron
env_file:
- ./.env
volumes:
- ./app:/app
depends_on:
- php-fpm
user: root
command: ['crond', '-f']
restart: always
nginx:
build: ./.docker/nginx
image: ${PROJECT_NAME}-nginx
container_name: ${PROJECT_NAME}-nginx
env_file:
- ./.env
ports: # 127.0.0.1 is required to prevent access from the internet in a production environment
- 127.0.0.1:${_NGINX_PORT}:80
- 127.0.0.1:${_NGINX_PORT_HTTPS}:443
volumes:
- ./.docker/certs:/etc/nginx/certs:ro
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./app:/app
depends_on:
- php-fpm
restart: always
node:
build: ./.docker/node
image: ${PROJECT_NAME}-node
container_name: ${PROJECT_NAME}-node
env_file:
- ./.env
ports:
- ${VITE_PORT}:${VITE_PORT}
volumes:
- ./.docker/certs:/etc/nginx/certs:ro
- ./app:/app
depends_on:
- nginx
working_dir: /app
user: 1000:1000
tty: true
restart: always
networks:
default:
name: ${PROJECT_NAME}-default