Install SoloDB on docker
Find below an example configuration of Docker compose using Traefik (with letsencrypt)
version: '3.9'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.5
# Enables the web UI and tells Traefik to listen to docker
command:
- --log.level=DEBUG
- --providers.docker
- --providers.docker.network=web
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http
- --certificatesresolvers.letsencrypt.acme.email=info@jield.nl
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
- --entrypoints.http.address=:80
- --entrypoints.http.http.redirections.entrypoint.to=https
- --entrypoints.http.http.redirections.entrypoint.scheme=https
- --entrypoints.https.address=:443
- --entrypoints.https.http.tls=true
- --entrypoints.https.http.tls.certResolver=letsencrypt
- --entrypoints.https.http.tls.domains[0].main=hostname.solodb.net
restart: always
networks:
web: { }
ports:
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- certs:/letsencrypt
solodb:
image: ghcr.io/jield-webdev/solodb/app:latest
labels:
- traefik.enable=true
- traefik.http.services.solodb.loadbalancer.server.port=80
- traefik.http.routers.solodb.service=webserver
- traefik.http.routers.solodb.rule=Host(`hostname.solodb.net`)
- traefik.http.routers.solodb.entrypoints=https
- traefik.http.routers.solodb.tls=true
restart: always
volumes:
- ./conf/production.global.php:/var/www/config/autoload/production.global.php
environment:
SOLODB_ENVIRONMENT: production
SOLODB_HOST: black-semiconductor
networks:
- internal
volumes:
certs:
networks:
web:
external: true
internal:
external: false