-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
68 lines (62 loc) · 1.65 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
66
67
version: '2.4'
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
postgres-data:
external: true
services:
### NGINX Server #########################################
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ${APP_CODE_FIRST_PROJECT}:/var/www/html
- ${APP_CODE_SECOND_PROJECT}:/var/www/html2
- ${APP_CODE_THIRD_PROJECT}:/var/www/html3
- ./nginx/ssl/:/etc/nginx/ssl
- ./nginx/sites/site.conf:/etc/nginx/conf.d/default.conf
networks:
- frontend
- backend
depends_on:
- php
### PHP Server ###########################################
# You can change the image to change version of php, for example:
# image: php:8.0-fpm
# image: php:7.4-fpm
# image: php:7.3-fpm
# image: php:7.2-fpm
# image: php:7.1-fpm
# image: php:7.0-fpm
php:
image: php:8.0-fpm
ports:
- "9000:9000"
networks:
- frontend
- backend
volumes:
- ${APP_CODE_FIRST_PROJECT}:/var/www/html
- ${APP_CODE_SECOND_PROJECT}:/var/www/html2
- ${APP_CODE_THIRD_PROJECT}:/var/www/html3
### PostgreSQL ###########################################
postgres:
build: ./postgres
volumes:
- postgres-data:/var/lib/postgresql/data
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./postgres/configuration:/etc/postgresql
ports:
- "5432:5432"
environment:
- POSTGRES_DB=db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
networks:
- frontend
- backend
command: postgres -c config_file=/etc/postgresql/postgresql.conf