-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
87 lines (83 loc) · 3.02 KB
/
docker-compose.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3'
services:
db:
image: mysql:5.7
volumes:
# Store mysql server data on persistent volume
# Bind mounts on Mac OS is very slow so use delegated volumes, remove :delegated on other OS
- ./persistent_data/db_data:/var/lib/mysql:delegated
restart: always
environment:
# Refer to docker image for information on available environment at https://hub.docker.com/_/mysql/
# SeedMeLab requires a mysql database and a user
# To create a new database and user provide the root password
# Alternatively, provide a pre created database, user and password to use for installation in seedmelab service
MYSQL_ROOT_PASSWORD: 'GENERATE_RANDOM_PASSWORD'
# When MYSQL__ROOT_PASSWORD is set to 'GENERATE_RANDOM_PASSWORD'
# it will be changed during drupal installation to ensure security
seedmelab:
build:
context: setup
container_name: seedmelab
restart: always
ports: # local deployment can be accessed at http://localhost:8080
- '8080:80'
volumes:
# Store entire drupal code and site data on persistent volume
# Bind mounts on Mac OS is very slow so use delegated volumes, remove :delegated on other OS
- ./persistent_data/site_data:/var/www:delegated
environment:
APACHE_DOCUMENT_ROOT: '/var/www/web'
# MYSQL variables must match as listed on db service for mysql above
# These are only used once by install_drupal.sh and never again
# The root password is changed during installation
MYSQL_ROOT_PASSWORD: 'GENERATE_RANDOM_PASSWORD'
# If using your own MYSQL server, comment MYSQL_ROOT_PASSWORD and specify the following
# in a docker environment file
# Refer to instructions on required character set, collation and user privileges
# https://www.drupal.org/docs/installing-drupal/step-3-create-a-database
# MYSQL_HOST:
# MYSQL_PORT:
# MYSQL_DATABASE:
# MYSQL_USER:
# MYSQL_PASSWORD:
#
# Set site domain (fqdn) when deploying a public site
# Ignore these local deployments
LETSENCRYPT_HOST: $VIRTUAL_HOST
VIRTUAL_HOST: $VIRTUAL_HOST
depends_on:
- db
nginx-proxy:
build: setup/nginx_proxy/
ports:
- '80:80'
- '443:443'
volumes:
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- vhost:/etc/nginx/vhost.d
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
- 'com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy'
restart: always
depends_on:
- seedmelab
- nginx-letsencrypt
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- certs:/etc/nginx/certs:rw
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
environment:
LETSENCRYPT_KEYSIZE: 2048
# These volumes are used by nginx-letsencrypt and managed by docker
volumes:
certs:
html:
vhost:
dhparam: