2018-05-06 21:08:49 +02:00
|
|
|
services:
|
2025-02-23 08:41:04 +01:00
|
|
|
inventaire:
|
2025-02-26 23:32:20 +01:00
|
|
|
image: inventaire/inventaire:latest
|
2025-02-26 20:55:53 +01:00
|
|
|
env_file: .env
|
2024-12-25 13:09:48 +01:00
|
|
|
# You may also build image from sources with:
|
|
|
|
|
# build:
|
|
|
|
|
# context: ./inventaire
|
|
|
|
|
# dockerfile: Dockerfile.inventaire
|
2025-02-23 08:41:04 +01:00
|
|
|
depends_on:
|
2025-02-26 20:55:53 +01:00
|
|
|
- couchdb
|
2025-02-23 08:41:04 +01:00
|
|
|
- elasticsearch
|
2025-02-27 18:19:25 +01:00
|
|
|
volumes:
|
2025-04-15 20:39:09 +02:00
|
|
|
# The following paths are outside /opt/inventaire so that the inventaire-server volume can be removed
|
|
|
|
|
# (as required when updating the server and client) without loosing their data
|
|
|
|
|
- inventaire-leveldb:/opt/inventaire_leveldb
|
|
|
|
|
- inventaire-local-media-storage:/opt/inventaire_local_media_storage
|
|
|
|
|
- inventaire-backups:/opt/inventaire_backups
|
2025-02-23 08:41:04 +01:00
|
|
|
logging:
|
|
|
|
|
options:
|
|
|
|
|
max-size: "10m"
|
|
|
|
|
max-file: "3"
|
2025-02-26 20:55:53 +01:00
|
|
|
restart: unless-stopped
|
2021-08-25 15:46:12 +02:00
|
|
|
couchdb:
|
2025-02-26 20:55:53 +01:00
|
|
|
build:
|
|
|
|
|
context: ./couchdb
|
|
|
|
|
dockerfile: Dockerfile.couchdb
|
|
|
|
|
env_file: .env
|
2025-03-05 16:13:20 +01:00
|
|
|
environment:
|
|
|
|
|
# See https://docs.couchdb.org/en/stable/maintenance/performance.html#disk-and-file-system-performance
|
|
|
|
|
- 'ERL_FLAGS=+A 4'
|
2025-02-26 07:39:01 +01:00
|
|
|
# Uncomment ports to get access to the db
|
|
|
|
|
# ie. for database transformation, querying, UI access (http://localhost:5984/_utils/)
|
2025-02-27 17:21:46 +01:00
|
|
|
# /!\ Beware that exposing container ports like this might bypass your firewall rules
|
|
|
|
|
# See https://docs.docker.com/engine/install/ubuntu/#firewall-limitations
|
|
|
|
|
# Keeping it bound to localhost (which is the default) should be safe though
|
|
|
|
|
# (that is, contrary to binding to 0.0.0.0)
|
2025-02-26 07:39:01 +01:00
|
|
|
# ports:
|
|
|
|
|
# - "5984:5984"
|
2024-12-25 13:09:48 +01:00
|
|
|
volumes:
|
|
|
|
|
- 'couchdb:/opt/couchdb/data'
|
2025-02-26 20:55:53 +01:00
|
|
|
restart: unless-stopped
|
2018-05-09 18:19:47 +02:00
|
|
|
elasticsearch:
|
2025-02-27 00:21:49 +01:00
|
|
|
image: elasticsearch:7.17.28
|
2018-05-09 18:19:47 +02:00
|
|
|
environment:
|
2024-12-25 13:09:48 +01:00
|
|
|
- 'http.host=elasticsearch'
|
|
|
|
|
- 'transport.host=elasticsearch'
|
2023-04-28 14:05:45 +02:00
|
|
|
# See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/docker.html
|
2020-09-24 17:34:52 +02:00
|
|
|
- 'discovery.type=single-node'
|
2025-02-27 20:00:27 +01:00
|
|
|
# Limit memory usage to 512MB, that should be enough at first
|
2025-02-23 08:41:04 +01:00
|
|
|
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html
|
2025-02-27 20:00:27 +01:00
|
|
|
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
|
2025-02-27 20:08:20 +01:00
|
|
|
- 'xpack.security.enabled=false'
|
|
|
|
|
- 'ingest.geoip.downloader.enabled=false'
|
|
|
|
|
- 'logger.org.elasticsearch=ERROR'
|
|
|
|
|
- 'logger.com.azure.core=ERROR'
|
|
|
|
|
- 'logger.org.apache=ERROR'
|
2024-12-25 10:32:11 +01:00
|
|
|
volumes:
|
|
|
|
|
- 'elasticsearch:/usr/share/elasticsearch/data'
|
2025-02-26 20:55:53 +01:00
|
|
|
restart: unless-stopped
|
2024-12-25 13:09:48 +01:00
|
|
|
nginx:
|
|
|
|
|
build:
|
|
|
|
|
context: ./nginx
|
|
|
|
|
dockerfile: Dockerfile.nginx
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx/templates:/etc/nginx/templates/
|
|
|
|
|
- ./nginx/snippets:/etc/nginx/snippets
|
2025-05-31 16:49:41 +02:00
|
|
|
- certbot-www:/var/www/html
|
2024-12-25 13:09:48 +01:00
|
|
|
- ./certbot/conf:/etc/letsencrypt
|
2025-04-15 20:39:09 +02:00
|
|
|
- nginx-cache:/tmp/nginx
|
2025-02-26 20:55:53 +01:00
|
|
|
env_file: .env
|
2024-12-25 13:09:48 +01:00
|
|
|
depends_on:
|
2025-02-26 20:55:53 +01:00
|
|
|
# Required to be able to define the `inventaire` host as an upstream
|
2024-12-25 13:09:48 +01:00
|
|
|
- inventaire
|
2025-02-26 20:55:53 +01:00
|
|
|
restart: unless-stopped
|
2024-12-25 13:09:48 +01:00
|
|
|
certbot:
|
|
|
|
|
image: certbot/certbot:latest
|
|
|
|
|
volumes:
|
|
|
|
|
- ./certbot/conf:/etc/letsencrypt
|
2025-05-31 16:49:41 +02:00
|
|
|
- certbot-www:/var/www/html
|
2024-12-25 13:09:48 +01:00
|
|
|
restart: unless-stopped
|
2025-05-31 16:49:41 +02:00
|
|
|
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/html; sleep 12h & wait $${!}; done;"
|
2024-12-25 13:09:48 +01:00
|
|
|
depends_on:
|
|
|
|
|
- nginx
|
|
|
|
|
|
2021-02-08 12:53:00 +01:00
|
|
|
volumes:
|
|
|
|
|
couchdb:
|
2025-02-23 08:41:04 +01:00
|
|
|
elasticsearch:
|
2024-12-25 13:09:48 +01:00
|
|
|
certbot-www:
|
2025-02-27 19:18:02 +01:00
|
|
|
inventaire-server:
|
2025-04-15 20:39:09 +02:00
|
|
|
inventaire-leveldb:
|
|
|
|
|
inventaire-local-media-storage:
|
|
|
|
|
inventaire-backups:
|
|
|
|
|
nginx-cache:
|