forked from AkkomaGang/akkoma
Add docker override file to docs and gitignore
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:
parent
3f1e2b0b3b
commit
0cb3812ac0
3 changed files with 28 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -78,3 +78,4 @@ docs/venv
|
|||
# docker stuff
|
||||
docker-db
|
||||
*.iml
|
||||
docker-compose.override.yml
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 !}
|
||||
|
|
Loading…
Reference in a new issue