This repository was archived by the owner on Apr 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.37 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
50
51
52
53
54
55
56
57
58
59
60
version: '3.6'
services:
web:
image: nginx
labels:
traefik.enable: true
traefik.docker.network: sfdemopg
traefik.http.services.www.loadbalancer.server.port: 80
traefik.http.routers.www.rule: "Host(`demo.localhost.tv`)"
traefik.http.routers.www.entrypoints: web
ports:
- 80
- 443
volumes:
- ./project:/var/www
- ./.docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./.docker/nginx/demo.conf:/etc/nginx/sites-enabled/demo.conf
restart: always
depends_on:
- php
networks:
sfdemopg:
aliases:
- demo.localhost.tv
db:
image: postgres:13
restart: always
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DB: ${PG_DATABASE}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- 5432
networks:
- sfdemopg
php:
build: .docker/php
restart: always
environment:
PG_HOST: ${PG_HOST}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
PG_PORT: ${PG_PORT}
PG_DATABASE: ${PG_DATABASE}
volumes:
- ./project:/var/www
- ${COMPOSER_HOME:-/tmp/composer}:/home/www-data/.composer # Share composer cache
depends_on:
- db
user: "${VOLUME_USER_ID:-www-data}:www-data"
networks:
- sfdemopg
networks:
sfdemopg:
driver: bridge