Add docker override file to docs and gitignore
ci/woodpecker/pr/build-amd64 Pipeline is pending Details
ci/woodpecker/pr/build-arm64 Pipeline is pending Details
ci/woodpecker/pr/docs Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details

The docker-compose.yml file is likely to be edited quite extensively by
admins when setting up an instance. This would likely cause problems
when dealing with updating Akkoma as merge conflicts would likely occur.

Docker-compose already has the ability to use override files in addition
to the main `docker-compose.yml` file. Admins can instead put any
overrides (additional volumes, container for elasticsearch, etc.) into a
file that won't be tracked by git and thus won't run into merge
conflicts in the future. In particular, the
`docker-compose.override.yml` will be checked by docker compose in
addition to the main file if it exists and override definitions from the
latter with the former.
This commit is contained in:
Norm 2023-08-07 13:08:54 -04:00
parent 3f1e2b0b3b
commit 0cb3812ac0
Signed by untrusted user: norm
GPG Key ID: 7123E30E441E80DE
3 changed files with 28 additions and 2 deletions

1
.gitignore vendored
View File

@ -78,3 +78,4 @@ docs/venv
# docker stuff
docker-db
*.iml
docker-compose.override.yml

View File

@ -45,7 +45,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

View File

@ -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 !}