version: '2' services: proxy-base: image: nginx ports: - '80:80' - '443:443' logging: driver: "gelf" options: gelf-address: "udp://localhost:5000" tag: "proxy" volumes: - './certs/:/certs:z' - './webapp/resources/public/:/usr/share/nginx/html:z' - './nginx/nginx.conf:/etc/nginx/nginx.conf:z' - './nginx/htpasswd:/etc/nginx/htpasswd:z' proxy: extends: service: proxy-base links: - mapproxy - backend - logstash - kibana volumes: - './nginx/proxy.conf:/etc/nginx/conf.d/default.conf:z' # Only difference is added X-Robots-tag 'noindex' # to make search engines ignore dev-site(s) proxy-dev: extends: service: proxy-base links: - mapproxy - backend - logstash - kibana volumes: - './nginx/proxy_dev.conf:/etc/nginx/conf.d/default.conf:z' htpasswd: image: lipas/htpasswd build: context: ./htpasswd dockerfile: Dockerfile mapproxy: image: kartoza/mapproxy hostname: mapproxy logging: driver: "gelf" options: gelf-address: "udp://localhost:5000" tag: "mapproxy" environment: TZ: Europe/Helsinki MML_AUTH: command: /mapproxy/start.sh volumes: - './mapproxy:/mapproxy:z' - 'mapproxy_cache:/cache_data' ports: - '8080:8080' backend-base: image: clojure:lein working_dir: /usr/src/app logging: driver: "gelf" options: gelf-address: "udp://localhost:5000" tag: "backend" environment: DB_HOST: DB_PORT: DB_NAME: DB_USER: DB_PASSWORD: SMTP_HOST: SMTP_USER: SMTP_PASS: SMTP_FROM: SEARCH_HOST: SEARCH_USER: SEARCH_PASS: OLD_LIPAS_URL: OLD_LIPAS_USER: OLD_LIPAS_PASS: ADMIN_PASSWORD: LEIN_SILENT: 'true' volumes: - './webapp/:/usr/src/app:z' - 'mvn_cache:/root/.m2' backend: extends: service: backend-base command: java -Duser.timezone=UTC -Xmx2G -jar backend.jar ports: - '8091:8091' links: - postgres - elasticsearch backend-dev: extends: service: backend-base command: lein ring server-headless hostname: backend ports: - '8091:8091' links: - postgres - elasticsearch backend-build: extends: service: backend-base command: bash -c 'lein uberjar && cp /tmp/uberjar/backend.jar .' backend-migrate: extends: service: backend-base command: lein migratus migrate links: - postgres backend-migrate-data: extends: service: backend-base environment: ICE_STADIUMS_CSV_URL: SWIMMING_POOLS_CSV_URL: entrypoint: lein run -m lipas.migrate-data links: - postgres backend-tests: extends: service: backend-base command: lein test links: - postgres - elasticsearch backend-seed: extends: service: backend-base command: lein run -m lipas.seed links: - postgres backend-maintenance: extends: service: backend-base logging: options: tag: "maintenance" entrypoint: lein run -m lipas.maintenance links: - postgres backend-index-search: extends: service: backend-base logging: options: tag: "search-indexer" entrypoint: lein run -m lipas.search-indexer links: - postgres - elasticsearch integrations: extends: service: backend-base logging: options: tag: "integrations" entrypoint: lein trampoline run -m lipas.integrator links: - postgres - elasticsearch worker: extends: service: backend-base logging: options: tag: "worker" entrypoint: lein trampoline run -m lipas.worker links: - postgres node-base: image: node:10-alpine working_dir: /usr/src/app logging: driver: "gelf" options: gelf-address: "udp://localhost:5000" tag: "backend-node" volumes: - './webapp/:/usr/src/app:z' frontend-npm-deps: extends: service: node-base command: npm install --quiet frontend-npm-bundle: extends: service: node-base command: npx webpack frontend-build: extends: service: backend-base command: lein cljsbuild once min headless-chrome: image: robcherry/docker-chromedriver privileged: true environment: CHROMEDRIVER_WHITELISTED_IPS: '' # Allow any source ports: - '4444:4444' integration-tests: extends: service: backend-base command: lein test :integration links: - headless-chrome - proxy postgres: image: mdillon/postgis:10 environment: DB_PORT: 5432 DB_NAME: DB_USER: DB_PASSWORD: DB_SUPERUSER: # Official Postgres image uses this variable POSTGRES_PASSWORD: ${DB_SUPERUSER_PASSWORD} ports: - '5432:5432' volumes: - pgdata:/var/lib/postgresql/data - ./db:/docker-entrypoint-initdb.d:z elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1 ports: - '9200:9200' - '9300:9300' environment: - transport.host=127.0.0.1 - xpack.security.enabled=false - xpack.monitoring.enabled=false - xpack.ml.enabled=false - xpack.graph.enabled=false - xpack.watcher.enabled=false - discovery.type=single-node - "ES_JAVA_OPTS=-Xms3g -Xmx3g" volumes: - esdata:/usr/share/elasticsearch/data logstash: image: docker.elastic.co/logstash/logstash:7.1.1 ports: - "5000:5000/udp" environment: - xpack.monitoring.enabled=false links: - elasticsearch volumes: - "./logstash/pipeline:/usr/share/logstash/pipeline:z" kibana: image: docker.elastic.co/kibana/kibana:7.1.1 ports: - "5601:5601" environment: - xpack.monitoring.enabled=false links: - elasticsearch volumes: - "./kibana/kibana.yml:/usr/share/kibana/config/kibana.yml:z" volumes: pgdata: {} esdata: {} mvn_cache: {} mapproxy_cache: {}