diff --git a/.gitignore b/.gitignore index 8821d8ce1..b7411cb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ docs/venv # docker stuff docker-db *.iml +docker-compose.override.yml diff --git a/docker-compose.yml b/docker-compose.yml index 58abf189d..6c0e2a7e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,7 +46,7 @@ services: volumes: - .:/opt/akkoma - # Uncomment the following if you want to use a reverse proxy + # Copy this into docker-compose.override.yml and uncomment there if you want to use a reverse proxy #proxy: # image: caddy:2-alpine # restart: unless-stopped diff --git a/docs/docs/installation/docker_en.md b/docs/docs/installation/docker_en.md index 52c056173..9551b034a 100644 --- a/docs/docs/installation/docker_en.md +++ b/docs/docs/installation/docker_en.md @@ -125,7 +125,26 @@ cp docker-resources/Caddyfile.example docker-resources/Caddyfile Then edit the TLD in your caddyfile to the domain you're serving on. -Uncomment the `caddy` section in the docker compose file, +Copy the commented out `caddy` section in `docker-compose.yml` into a new file called `docker-compose.override.yml` like so: +```yaml +version: "3.7" + +services: + proxy: + image: caddy:2-alpine + restart: unless-stopped + links: + - akkoma + ports: [ + "443:443", + "80:80" + ] + volumes: + - ./docker-resources/Caddyfile:/etc/caddy/Caddyfile + - ./caddy-data:/data + - ./caddy-config:/config +``` + then run `docker compose up -d` again. #### Running a reverse proxy on the host @@ -155,6 +174,12 @@ git pull docker compose restart akkoma db ``` +### Modifying the Docker services +If you want to modify the services defined in the docker compose file, you can +create a new file called `docker-compose.override.yml`. There you can add any +overrides or additional services without worrying about git conflicts when a +new release comes out. + #### Further reading {! installation/further_reading.include !}