-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
123 lines (113 loc) · 3.68 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: "3.7"
volumes:
unit-state:
postgres-data:
caddy_data:
caddy_config:
services:
# Helper service to always have latest composer.lock changes installed
composer:
image: ghcr.io/peon-dev/php:main
volumes:
- .:/peon
working_dir: /peon
command: "composer install --no-interaction"
environment:
XDEBUG_MODE: "off"
# Helper service to run database migrations
db-migrations:
image: ghcr.io/peon-dev/php:main
depends_on:
- postgres
volumes:
- .:/peon
working_dir: /peon
command: "bash -c 'wait-for-it postgres:5432 -- sleep 3 && bin/console doctrine:migrations:migrate --no-interaction'"
environment:
XDEBUG_MODE: "off"
dashboard:
image: ghcr.io/peon-dev/php:main
volumes:
- .:/peon
- .docker/nginx-unit:/docker-entrypoint.d
- unit-state:/var/lib/unit/state
working_dir: /peon
depends_on:
- composer
- db-migrations
- postgres
- mercure
ports:
- "${PEON_DASHBOARD_PORT:-8080}:8080"
environment:
XDEBUG_CONFIG: "${PEON_XDEBUG_CONFIG:-client_host=host.docker.internal}"
PHP_IDE_CONFIG: "serverName=peon"
js-watch:
image: node:14
volumes:
- .:/peon
working_dir: /peon
restart: unless-stopped
entrypoint: [""]
command: "bash -c 'yarn install && yarn run watch'"
postgres:
# alpine is forbidden => https://stackoverflow.com/questions/58135353/postgres-seems-to-be-ignoring-my-default-collation
image: postgres:13
environment:
POSTGRES_USER: peon
POSTGRES_PASSWORD: peon
POSTGRES_DB: peon
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "${PEON_POSTGRES_PORT:-5432}:5432"
worker:
image: ghcr.io/peon-dev/php:main
volumes:
- .:/peon
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/var/working_directories:/peon/var/working_directories
working_dir: /peon
depends_on:
- composer
- db-migrations
- postgres
command: "bash -c 'wait-for-it postgres:5432 -- sleep 5 && bin/worker'"
environment:
HOST_WORKING_DIRECTORIES_PATH: $PWD/var/working_directories
XDEBUG_CONFIG: "${PEON_XDEBUG_CONFIG:-client_host=host.docker.internal}"
PHP_IDE_CONFIG: "serverName=peon"
scheduler:
image: ghcr.io/peon-dev/php:main
volumes:
- .:/peon
working_dir: /peon
depends_on:
- composer
- db-migrations
- postgres
command: "bash -c 'wait-for-it postgres:5432 -- sleep 5 && bin/scheduler'"
environment:
XDEBUG_CONFIG: "${PEON_XDEBUG_CONFIG:-client_host=host.docker.internal}"
PHP_IDE_CONFIG: "serverName=peon"
adminer:
image: adminer:4.8.0
ports:
- "${PEON_ADMINER_PORT:-8000}:8080"
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
- postgres
mercure:
image: dunglas/mercure
restart: unless-stopped
environment:
SERVER_NAME: ':80'
MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'
ports:
- "${PEON_MERCURE_PORT:-8081}:80"
command: /usr/bin/caddy run --config /etc/caddy/Caddyfile.dev
volumes:
- caddy_data:/data
- caddy_config:/config