-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
64 lines (59 loc) · 1.6 KB
/
docker-compose.local.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
# Drupal with PostgreSQL
#
# Access via "http://localhost:8080"
# (or "http://$(docker-machine ip):8080" if using docker-machine)
#
# During initial Drupal setup,
# Database type: PostgreSQL
# Database name: postgres
# Database username: postgres
# Database password: example
# ADVANCED OPTIONS; Database host: postgres
version: '3.6'
services:
drupal:
build:
context: ./drupal
container_name: ${COMPOSE_PROJECT_NAME}-drupal
links:
- drupal-db:postgres
ports:
- 8080:80
volumes:
- type: volume
source: postgresql_data
target: /var/lib/postgresql/data/pgdata
- type: bind
source: ./drupal-data
target: /app
- type: bind
source: ./drupal-tmp
target: /tmp
restart: "always"
depends_on:
- drupal-db
drupal-db:
container_name: ${COMPOSE_PROJECT_NAME}-postgis
image: mdillon/postgis:10
environment:
# THIS IS MADNESS: envs need to be ordered POSTGRES_DB > POSTGRES_USER > POSTGRES_PASSWORD.
# https://github.com/docker-library/postgres/issues/41#issuecomment-382925263
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
#ports:
# - "0.0.0.0:${POSTGRES_PORT:-54320}:5432"
volumes:
- type: volume
source: postgresql_data
target: /var/lib/postgresql/data/pgdata
- type: tmpfs
target: /tmp
restart: "always"
networks:
default:
external:
name: ${NETWORK:-clarity}
volumes:
postgresql_data: