-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
63 lines (57 loc) · 1.16 KB
/
docker-compose.dev.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
version: "3.8"
x-templates:
default-variables: &default-variables
TZ: UTC
default-service: &default-service
restart: unless-stopped
tty: true
stdin_open: true
init: true
extra_hosts:
- host.docker.internal:host-gateway
environment:
<<: *default-variables
as-current-user: &as-current-user
user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000}
services:
# PHP
app:
<<:
- *default-service
- *as-current-user
image: user-api/app
build: ./app
container_name: user-api-app
command: "rr serve -c .rr.dev.yaml"
environment:
"SERVER_BIND": "0.0.0.0"
volumes:
- ./app:/app
working_dir: /app
ports:
- "80:80"
networks:
- app
# PostgreSQL
db:
<<: *default-service
image: postgres:16-alpine
container_name: user-api-db
environment:
<<: *default-variables
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: app
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- app
networks:
app:
driver: bridge
volumes:
db-data:
name: user-api-db-data
driver: local