-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.symfony.yml
59 lines (53 loc) · 1.33 KB
/
docker-compose.symfony.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
version: '3.4'
services:
app:
image: pnlinh/symfony:php${PHP_VERSION:-8.1}
hostname: "${DOCKER_PREFIX_NAME}-app"
container_name: "${DOCKER_PREFIX_NAME}-app"
environment:
PHP_IDE_CONFIG: serverName="${DOCKER_PREFIX_NAME}-app.docker.cli"
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pgsql:5432/${POSTGRES_DB}?serverVersion=${POSTGRES_VERSION:-14}&charset=utf8
extra_hosts:
- host.docker.internal:host-gateway
ports:
- "${DOCKER_APP_PORT:-80}:80"
volumes:
- ./:/var/www/html
networks:
- localnet
redis:
image: redis:alpine
container_name: "${DOCKER_PREFIX_NAME}-redis"
ports:
- "${DOCKER_REDIS_PORT:-6379}:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
networks:
- localnet
mail:
image: mailhog/mailhog
container_name: "${DOCKER_PREFIX_NAME}-mailhog"
ports:
- "${DOCKER_MAIL_PORT:-8025}:8025"
networks:
- localnet
static-builder:
build:
context: .
dockerfile: docker/node.Dockerfile
image: pnlinh/symfony-encore
container_name: symfony-encore
volumes:
- ./:/app
volumes:
pgsql-data:
driver: local
redis-data:
driver: local
networks:
localnet:
driver: "bridge"