-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
104 lines (103 loc) · 3.09 KB
/
docker-compose.yaml
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
version: "3.8"
services:
symfony:
container_name: symfony
image: pbourdet/symfony-dev
build:
context: ./symfony/.
target: symfony_php_dev
restart: unless-stopped
volumes:
- php_socket:/var/run/php
- php_logs:/srv/app/var/log
- ./symfony/:/srv/app:rw,cached
- ./symfony/docker/php/conf.d/symfony.dev.ini:/usr/local/etc/php/conf.d/symfony.ini
- ./symfony/docker/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
environment:
APP_ENV: dev
RUN_FIXTURES: 'true'
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
workers:
container_name: workers
image: pbourdet/workers-dev
build:
context: ./symfony/.
target: symfony_php
restart: unless-stopped
command: ["bin/console", "messenger:consume", "async"]
environment:
APP_ENV: dev
caddy:
container_name: caddy
image: pbourdet/caddy-dev
build:
context: ./symfony/.
target: symfony_caddy
depends_on:
- symfony
restart: unless-stopped
volumes:
- php_socket:/var/run/php
- caddy_data:/data
- caddy_config:/config
- ./symfony/docker/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./symfony/public:/srv/app/public:ro
ports:
- "80:80/tcp"
- "443:443/tcp"
- "443:443/udp"
environment:
SERVER_NAME: localhost, caddy:80
MERCURE_PUBLISHER_JWT_KEY: 1234567890123456789012345678901234567890
MERCURE_SUBSCRIBER_JWT_KEY: 1234567890123456789012345678901234567890
MERCURE_EXTRA_DIRECTIVES: |-
cors_origins https://localhost:3000
php-logs:
container_name: php-logs
image: busybox
depends_on:
- symfony
volumes:
- php_logs:/var/log
- ./symfony/docker/php-logs/print-logs.sh:/var/print-logs.sh
command: ["sh", "/var/print-logs.sh"]
environment:
APP_ENV: dev
postgres:
container_name: postgres
image: postgres:13-alpine
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: pbourdet
POSTGRES_PASSWORD: root
POSTGRES_USER: root
mailhog:
container_name: mailhog
image: mailhog/mailhog
logging:
driver: 'none'
ports:
- "1025:1025"
- "8025:8025"
react:
container_name: react
image: pbourdet/react-dev
build:
context: ./frontend-react/.
target: react
args:
APP_ENV: dev
volumes:
- /app/node_modules
- ./frontend-react/:/app
ports:
- "3000:3000"
volumes:
php_socket:
caddy_data:
caddy_config:
php_logs: