-
-
Notifications
You must be signed in to change notification settings - Fork 365
/
docker-compose.yaml
56 lines (52 loc) · 1.21 KB
/
docker-compose.yaml
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
version: "3.9"
services:
app:
container_name: ${PROJECT_NAME}-app
image: ghpvc-app
build:
context: ./
dockerfile: ./.docker/php/Dockerfile
restart: unless-stopped
depends_on:
- postgres
working_dir: /app
volumes:
- ./:/app
- ./.docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
networks:
- ghpvc
nginx:
container_name: ${PROJECT_NAME}-nginx
image: nginx:1.21-alpine
restart: unless-stopped
depends_on:
- app
ports:
- "80:80"
environment:
VIRTUAL_HOST: app.ghpvc.localhost
volumes:
- ./.docker/nginx/app.ghpvc.80.conf:/etc/nginx/conf.d/app.ghpvc.80.conf:ro
- ./public:/app/public:ro
networks:
- ghpvc
postgres:
container_name: ${PROJECT_NAME}-postgres
image: postgres:13.4-alpine
restart: unless-stopped
ports:
- "${DB_PORT:-5432}:${DB_PORT:-5432}"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- ./.docker-volume-postgres:/var/lib/postgresql/data
networks:
- ghpvc
volumes:
.docker-volume-postgres:
driver: local
networks:
ghpvc:
driver: bridge