-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1.18 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
version: '3'
services:
nginx:
image: nginx:stable-alpine
container_name: ${APP_NAME}_nginx
restart: unless-stopped
ports:
- "8000:80"
links:
- app
volumes:
- ./:/var/www
- ./nginx:/etc/nginx/conf.d/
depends_on:
- app
- db
app:
build:
args:
user: sammy
uid: 1000
context: .
dockerfile: app.Dockerfile
container_name: ${APP_NAME}_php
command: sh -c "./post_deploy.sh"
working_dir: /var/www/
volumes:
- ./:/var/www
ports:
- "9001:9000"
- "6001:6001"
env_file:
- .env
db:
image: postgres:12.3-alpine
container_name: ${APP_NAME}_postgres
restart: unless-stopped
ports:
- "5433:5432"
volumes:
- ./docker/postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_HOST_AUTH_METHOD: "trust"