services: inventaire: image: inventaire/inventaire:latest env_file: .env depends_on: - couchdb - elasticsearch tty: true logging: options: max-size: "10m" max-file: "3" restart: unless-stopped couchdb: build: context: ./couchdb dockerfile: Dockerfile.couchdb env_file: .env # Uncomment ports to get access to the db # ie. for database transformation, querying, UI access (http://localhost:5984/_utils/) # ports: # - "5984:5984" volumes: - 'couchdb:/opt/couchdb/data' tty: true restart: unless-stopped elasticsearch: image: elasticsearch:7.17.28 environment: - 'http.host=elasticsearch' - 'transport.host=elasticsearch' # See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/docker.html - 'discovery.type=single-node' # Limit memory usage to 1Go, # See https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html - 'ES_JAVA_OPTS=-Xms1g -Xmx1g' volumes: - 'elasticsearch:/usr/share/elasticsearch/data' restart: unless-stopped nginx: build: context: ./nginx dockerfile: Dockerfile.nginx ports: - "80:80" - "443:443" volumes: - ./nginx/templates:/etc/nginx/templates/ - ./nginx/snippets:/etc/nginx/snippets - ./inventaire:${PROJECT_ROOT} - certbot-www:/var/www/certbot - ./certbot/conf:/etc/letsencrypt env_file: .env depends_on: # Required to be able to define the `inventaire` host as an upstream - inventaire restart: unless-stopped certbot: image: certbot/certbot:latest volumes: - ./certbot/conf:/etc/letsencrypt - certbot-www:/var/www/certbot restart: unless-stopped entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;" depends_on: - nginx volumes: couchdb: elasticsearch: certbot-www: