-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.42 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
x-environment: &environment
env_file:
- path: ./.env.example
required: true
- path: ./.env
required: false
services:
nginx:
<<: *environment
image: nginx:alpine
container_name: phplrt-nginx
working_dir: /home/phplrt/phplrt.org
volumes:
- .:/home/phplrt/phplrt.org:ro
- ./docker/nginx/phplrt.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "${APP_HTTP_PUBLIC_PORT:-81}:80"
depends_on:
- php
networks:
- frontend
php:
build: docker/php
user: '1000:1000'
container_name: phplrt-php
working_dir: /home/phplrt/phplrt.org
volumes:
- composer:/home/phplrt/.composer:rw
- .:/home/phplrt/phplrt.org:rw
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/local.ini:ro
depends_on:
- postgres
networks:
- frontend
- database
postgres:
<<: *environment
image: postgres:15.3
container_name: phplrt-postgres
volumes:
- postgres:/var/lib/postgresql/data
- ./docker/data/postgres:/home/db
environment:
- POSTGRES_DB=${DB_DATABASE:-phplrt}
- POSTGRES_USER=${DB_USERNAME:-user}
- POSTGRES_PASSWORD=${DB_PASSWORD:-password}
ports:
- "${APP_DATABASE_PUBLIC_PORT:-5432}:5432"
networks:
- database
networks:
frontend:
name: phplrt_org
driver: bridge
database:
volumes:
postgres:
composer:
driver_opts:
o: "uid=${UID:-1000}"