-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
124 lines (112 loc) · 3.75 KB
/
compose.yml
File metadata and controls
124 lines (112 loc) · 3.75 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
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
124
services:
proxy:
container_name: ${PROJECT_NAME}_proxy
image: nginxinc/nginx-unprivileged:stable-alpine
depends_on:
app:
condition: service_healthy
# - node
environment:
STACK_NAME: ${PROJECT_NAME}
WP_DEBUG: 0
APP_USER: ${APP_USER:-symfony}
volumes:
- ./public:/srv/app/public:ro
# - ./public/media:/srv/app/public/media:ro
- ./docker/nginx/templates/default.conf.template:/etc/nginx/templates/default.conf.template
- ./docker/nginx/.htpasswd:/etc/nginx/.htpasswd
# - php_socket:/var/run/php
networks:
- https
- app
ports:
- "800:8080"
app:
container_name: ${PROJECT_NAME}_app
build:
context: .
target: app_php_dev
args:
SYMFONY_VERSION: ${SYMFONY_VERSION:-7.2.*}
APP_USER: ${APP_USER:-symfony}
# restart: unless-stopped
volumes:
- ./:/srv/app/
# - ./docker/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
healthcheck:
test: ["CMD", "test", "-f", "/srv/app/public/index.php"]
interval: 5s
timeout: 3s
retries: 20
start_period: 60s
environment:
# Run "composer require symfony/orm-pack" to install and configure Doctrine ORM
DATABASE_URL: pgsql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@${PROJECT_NAME}_database:5432/${DATABASE_NAME}?serverVersion=16&charset=utf8
APP_ENV: dev
APP_DEBUG: 1
HOSTNAME: localhost
MAILER_DSN: smtp://mailhog:1025
ADMIN_PREFIX_ROUTE: admin
XDEBUG_MODE: 'debug'
PHP_DATE_TIMEZONE: 'Europe/Paris'
XDEBUG_CONFIG: 'mode=debug client_host=host.docker.internal idekey=phpstorm-xdebug start_with_request=trigger remote_handler=dbgp client_port=9003'
extra_hosts:
- host.docker.internal:host-gateway
networks:
- app
###> doctrine/doctrine-bundle ###
# database:
# image: bitnami/postgresql:16
# container_name: ${PROJECT_NAME}_database
# environment:
# - POSTGRESQL_USERNAME=${DATABASE_USERNAME}
# - POSTGRESQL_PASSWORD=${DATABASE_PASSWORD}
# - POSTGRESQL_DATABASE=${DATABASE_NAME}
# volumes:
# - pg_data:/bitnami/postgresql
#
# healthcheck:
# test: [ "CMD", "pg_isready", "-d", "${POSTGRES_DB:-secret}", "-U", "${POSTGRES_USER:-secret}" ]
# timeout: 5s
# retries: 5
# start_period: 60s
# ports:
# - "5432:5432"
#
# networks:
# - app
# - adminer
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
node:
container_name: ${PROJECT_NAME}_node
tty: true
image: node:lts
working_dir: /usr/src/app/
volumes:
- ./:/usr/src/app
- ./docker/node/.npmrc:/root/.npmrc
command: sh
# mailhog:
# image: mailhog/mailhog:latest
# container_name: ${PROJECT_NAME}_mailhog
# environment:
# - MH_STORAGE=maildir
# # volumes:
# # - ./docker/mailhog/maildir:/maildir:rw,delegated
# networks:
# - app
# ports:
# - "1025:1025"
# - "8025:8025"
networks:
https:
external: true
adminer:
external: true
app:
name: ${PROJECT_NAME}_app
volumes:
###> doctrine/doctrine-bundle ###
pg_data:
name: ${PROJECT_NAME}_database
###< doctrine/doctrine-bundle ###