-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
151 lines (135 loc) · 6.89 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '3' # Just don't use '1'
# ISLE Alpha 2, for Development and Testing.
# Usernames and passwords to login to Tomcat on services fedora and solr is: admin,ild_tc_adm_2018
# this is specified in the default tomcat-users.xml and SHOULD be replaced in production. I think for testing purposes, default tomcat-users is fine.
#Define our services.
services:
# PHPMyAdmin is a MySQL administration GUI. It's helpful for me! https://www.phpmyadmin.net/
# Connect to this container @ http://<hostip>:8081 - the sql host is "mysql" and user is "root" with password set in the mysql service ENV.
myadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
networks:
- isleinternal
ports:
- 8081:80
volumes:
- /sessions
depends_on:
- mysql
restart: no ## other options are "no" "unless-stopped" "on-failure". We need a health check for the latter most option.
mysql:
image: islandoracollabgroup/isle-mysql
container_name: isle-mysql
hostname: mysql # NB: unnecessary?
environment:
- MYSQL_ROOT_PASSWORD=barnard123 # This is for development; on production the root password will not be stored in the compose.
networks:
- isleinternal
ports:
- "3306:3306"
volumes:
# - ./bcol/mysql/data:/sql_databases_for_import # Place SQL dump files here; note: I've been using phpmyadmin and uploading the .sql.gz files (which are on my desktop) this way.
# A note about the line above. Once your data is imported it is placed into the volume called "db_data" described next.
- db_data:/var/lib/mysql
# The above data volume WILL persist across containers - you are NOT required to repopulate your DBs if you stop or rm the container.
- ./bcol/mysql/config/my.cnf:/etc/alternatives/my.cnf:ro # This is likely deprecated, tlk to Gavin.
# restart: unless-stopped # In production set this to "never" or "unless-stopped"!
fedora:
image: islandoracollabgroup/isle-fedora
container_name: isle-fedora
hostname: fedora
networks:
- isleinternal
ports:
- "8080:8080"
- "8777:80"
tty: true
depends_on:
- mysql
- solr
volumes:
## Fedora datastore!
- /mnt/barnard/islandora/fedora/data:/usr/local/fedora/data # Barnard's Fedora data folder and all subfolders from bare metal instance.
## Fedora config
- ./bcol/fedora/config/fedora.fcfg:/usr/local/fedora/server/config/fedora.fcfg # Make sure your jbdc mysql string is correct: username, password, and database name.
- ./bcol/fedora/config/fedora-users.xml:/usr/local/fedora/server/config/fedora-users.xml # Our Fedora Users
- ./bcol/fedora/config/filter-drupal.xml:/usr/local/fedora/server/config/filter-drupal.xml # hostname for mysql server is "mysql"
## FGS config
- ./bcol/fedoragsearch/config/fgsconfigFinal/fedoragsearch.properties:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/fedoragsearch.properties
- ./bcol/fedoragsearch/config/fgsconfigFinal/fgsconfigObjects.properties:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/fgsconfigObjects.properties
- ./bcol/fedoragsearch/config/fgsconfigFinal/index/FgsIndex/index.properties:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
- ./bcol/fedoragsearch/config/fgsconfigFinal/repository/FgsRepos/repository.properties:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/repository/FgsRepos/repository.properties
- /dev/null:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/lib/log4j-over-slf4j-1.5.10.jar # This is a hack that is likely deprecated and uneeded. It's also funny because why not just create a blank file?
command: /usr/local/tomcat/bin/catalina.sh run # deprecate and stop apache from loading on this container until it is removed at a later date!
# restart: unless-stopped
solr:
image: islandoracollabgroup/isle-solr
container_name: isle-solr
hostname: solr
networks:
- isleinternal
ports:
- "8091:8080"
- "8983:8983"
tty: true
depends_on:
- mysql
volumes:
# A COMPLETE OVERWRITE WITH BC'S DATA
- /mnt/barnard/islandora/fedora/solr/collection1/data:/usr/local/solr/collection1/data
# A COMPLETE OVERWRITE WITH BC'S DATA
- /mnt/barnard/islandora/fedora/solr/collection1/conf/schema.xml:/usr/local/solr/collection1/conf/schema.xml
# restart: unless-stopped
apache:
image: islandoracollabgroup/isle-apache
container_name: isle-apache
networks:
isleinternal:
tty: true
depends_on:
- mysql
- fedora
- solr
volumes:
- ./bcol/apache/conf/sites-enabled:/etc/apache2/sites-enabled # These need to be baked into the image and replace existing defaults.
- ./bcol/apache/conf/certs:/certs:ro # SNAKEOIL Certificate DIR. This container is only on the INTERNAL NETWORK.
- /mnt/barnard/www/html/islandora:/var/www/html
# restart: unless-stopped
proxy:
image: nginx
container_name: isle-proxy
networks:
isleinternal:
aliases: # For INTERNAL RESOLUTION to the docker-internal-network IP??
- belle.benjaminrosner.com
isleexternal:
ports:
- "80:80"
- "443:443"
depends_on:
- mysql
- fedora
- solr
- apache
volumes:
- ./bcol/proxy/config/nginx.conf:/etc/nginx/nginx.conf:ro # Global configuration that has been cleaned - good for main image. BAKE, please.
- ./bcol/proxy/certs:/certs:ro # Certs! Oh nom nom. - For the image we'll create self-signed certs - we'll need to disable stapling - isle.localdomain certs aqui
### END USER AND STUFFS
- ./bcol/proxy/config/conf.d:/etc/nginx/conf.d # Folder for global nginx configuration (pls bake: proxy-global, compression_and_cache-control - leave an example of COMPRESSION conf for end-user review, but not proxy-glob)
- ./bcol/proxy/config/upstreams.d:/etc/nginx/upstreams.d # folder for defining upstreams (upstream defines: devel, stage, production, etc. - bake one upstream for ILD)
- ./bcol/proxy/config/sites-enabled:/etc/nginx/sites-enabled # folder for vhosts (similar to Apache - bake isle.localdomain from belle, turn of OSCP / HSTS)
# restart: unless-stopped
# command: [nginx-debug, '-g', 'daemon off;']
# Defined networks
networks:
isleinternal:
isleexternal:
# Take a look a docker networking, here are things you can do in a compose environment. lots of this becomes easier with overlays :/
# EG (and my use case): Linux (maybe Mac) users can use MACVLAN as a way to make hosts on this network appear as though they were directly connected to the network. In this way you could put "proxy" on the network and route to it.
## https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/ (nice)
# Defined and saved
volumes:
db_data: