-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (65 loc) · 1.41 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
version: "3"
services:
php:
build:
context: './container/php/'
args:
PHP_VERSION: ${PHP_VERSION}
networks:
- backend
volumes:
- ${PROJECT_ROOT}/:/var/www/html/
container_name: php
apache:
build:
context: './container/apache/'
args:
APACHE_VERSION: ${APACHE_VERSION}
depends_on:
- php
- db
networks:
- frontend
- backend
ports:
- "80:80"
volumes:
- ${PROJECT_ROOT}/:/var/www/html/
container_name: apache
db:
image: postgres:${POSTGRES_VERSION:-latest}
restart: always
environment:
TZ: "${APP_TIMEZONE}"
POSTGRES_DB: "${DB_NAME}"
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
ports:
- '5432:5432' # Opens port 5432 on the container
expose:
- '5432'
networks:
- backend
volumes:
- data:/var/lib/postgresql/data
container_name: postgresql
phppgadmin:
image: dockage/phppgadmin:latest
restart: always
ports:
- "${PHP_PG_ADMIN_PORT:-8080}:80"
environment:
PHP_PG_ADMIN_SERVER_HOST: "db"
PHP_PG_ADMIN_SERVER_PORT: "${DB_PORT}"
PHP_PG_ADMIN_SERVER_DEFAULT_DB: "${DB_NAME}"
networks:
- backend
container_name: phppgadmin
networks:
frontend:
backend:
volumes:
data:
# useradd -
# chown -R user:group /var/www/html
# chomod -R 774 /var/www/