-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (44 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
49 lines (44 loc) · 1.04 KB
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
name: ${COMPOSE_PROJECT_NAME}
services:
postgres:
container_name: ${PROJECT_NAME}_postgres
image: postgres:latest
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql
restart: unless-stopped
php:
container_name: ${PROJECT_NAME}_php
build: .
volumes:
- ./:/var/www/html
environment:
DB_DRIVER: pgsql
DB_HOST: ${DB_HOST}
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
depends_on:
- postgres
restart: unless-stopped
nginx:
container_name: ${PROJECT_NAME}_nginx
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www/html
- ./nginx.conf.template:/etc/nginx/templates/default.conf.template:ro
- ./certs:/etc/nginx/certs:ro
environment:
- PROJECT_NAME=${PROJECT_NAME}
depends_on:
- php
restart: unless-stopped
volumes:
postgres_data: