-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (42 loc) · 1.27 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
services:
web-server:
image: nginx:latest
ports:
- "8081:8081"
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
app:
build:
dockerfile: ./php/Dockerfile
target: app
volumes:
- ./app:/var/www/html
- ./php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
environment:
POSTGRES_HOST: db
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DATABASE: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
REDIS_HOST: cache
REDIS_PORT: ${REDIS_PORT}
environment:
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
extra_hosts:
- host.docker.internal:host-gateway
db:
image: postgres:alpine3.18
volumes:
- pgsqldata:/var/lib/pgsql
ports:
- "2345:2345"
restart: unless-stopped
environment:
POSTGRES_ROOT_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
cache:
image: redis:latest
volumes:
pgsqldata: