diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..e68f4c4e --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,54 @@ +version: '3' + +services: + foswiki: + image: timlegge/docker-foswiki + container_name: foswiki + ports: + - 8765:80 + volumes: + - solr_logs:/opt/solr/server/logs:z + - solr_configsets:/opt/solr/server/solr/configsets:z + - solr_foswiki:/opt/solr/server/solr/solr_foswiki:z + - foswiki_www:/var/www/foswiki:z + networks: + - foswiki-network + + setup: + image: alpine:latest + container_name: setup + depends_on: + - foswiki + volumes: + - solr_configsets:/opt/solr/server/solr/configsets:z + - solr_foswiki:/opt/solr/server/solr/solr_foswiki:z + - foswiki_www:/var/www/foswiki:z + command: sh -c "cd /var/www/foswiki; chown -R 8983:8983 solr; cd /opt/solr/server/solr/configsets ; [ -L foswiki_configs ] && rm foswiki_configs ; ln -s /var/www/foswiki/solr/configsets/foswiki_configs/ . ; cd /opt/solr/server/solr/solr_foswiki ; [ -L core.properties ] && rm core.properties ; ln -s /var/www/foswiki/solr/cores/foswiki/core.properties ; chown -R 8983:8983 /opt/solr/server/solr ." + + solr: + image: solr:5 + container_name: solr + depends_on: + - setup + # only usefull to have access to solr console, will be delete in production + ports: + - 8983:8983 + volumes: + - solr_logs:/opt/solr/server/logs:z + - solr_configsets:/opt/solr/server/solr/configsets:z + - solr_foswiki:/opt/solr/server/solr/solr_foswiki:z + - foswiki_www:/var/www/foswiki:z + environment: + - GC_LOG_OPTS='' + - SOLR_LOG_LEVEL='WARN' + networks: + - foswiki-network + +volumes: + foswiki_www: + solr_logs: + solr_configsets: + solr_foswiki: + +networks: + foswiki-network: