-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·97 lines (90 loc) · 2.35 KB
/
docker-compose.yml
File metadata and controls
executable file
·97 lines (90 loc) · 2.35 KB
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
94
95
96
97
version: "3.7"
services:
balancer:
image: nginx:1.19.7-alpine
depends_on:
- nginx
- frontend
ports:
- "80:8080"
- "8090:8080"
restart: always
volumes:
- ./deployments/docker/balancer/nginx.conf:/etc/nginx/nginx.conf:delegated
frontend:
build:
context: Client
dockerfile: docker/nginx/Dockerfile
target: builder
args:
APP_VERSION: dev
working_dir: /app
volumes:
- ./Client:/app:delegated
command: npm run dev
php-fpm:
image: latepost/server-php-fpm
pull_policy: build
build:
context: Server
dockerfile: docker/php/Dockerfile
args:
ENV: dev
XDEBUG_ENABLED: 1
working_dir: /app
restart: on-failure
volumes:
- ./Server:/app:delegated
depends_on:
- 'mysql'
environment:
APP_DEBUG: "true"
DATABASE_URL: "mysql://user:password@mysql:3306/latepost?serverVersion=5.7.27&charset=utf8"
XDEBUG_MODE: "debug"
XDEBUG_CONFIG: "start_with_request=yes client_port=9007 client_host=host.docker.internal"
# XDEBUG_CONFIG: "start_with_request=yes client_port=9007 client_host=172.18.0.1"
XDEBUG_SESSION: "PHPSTORM"
PHP_IDE_CONFIG: "serverName=latepost"
ROUTER_HOST: "latepost.local"
ROUTER_SCHEME: 'http'
ROUTER_BASE_URL: ''
nginx:
build:
context: Server
dockerfile: docker/nginx/Dockerfile
args:
PHP_IMAGE: latepost/server-php-fpm
working_dir: /app
restart: on-failure
volumes:
- ./Server:/app:delegated
depends_on:
- 'php-fpm'
ports:
- "8080"
environment:
NGINX_HOST: "latepost.local"
NGINX_HTTP_PORT: "80"
NGINX_HTTPS: "off"
mysql:
image: mysql:5.7.27
command: --default-authentication-plugin=mysql_native_password
restart: always
expose:
- '3306'
ports:
- '8092:3306'
environment:
MYSQL_DATABASE: "latepost"
MYSQL_USER: "user"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_PASSWORD: "password"
volumes:
- mysql-latepost-data:/var/lib/mysql:delegated
restarter:
image: docker
volumes: [ "/var/run/docker.sock:/var/run/docker.sock" ]
command: [ "/bin/sh", "-c", "while true; do sleep 600; docker restart latepost-frontend-1; done" ]
restart: unless-stopped
volumes:
mysql-latepost-data: { }