forked from AkkomaGang/akkoma
Norm
0cb3812ac0
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.
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
db:
|
|
image: akkoma-db:latest
|
|
build: ./docker-resources/database
|
|
restart: unless-stopped
|
|
user: ${DOCKER_USER}
|
|
environment: {
|
|
# This might seem insecure but is usually not a problem.
|
|
# You should leave this at the "akkoma" default.
|
|
# The DB is only reachable by containers in the same docker network,
|
|
# and is not exposed to the open internet.
|
|
#
|
|
# If you do change this, remember to update "config.exs".
|
|
POSTGRES_DB: akkoma,
|
|
POSTGRES_USER: akkoma,
|
|
POSTGRES_PASSWORD: akkoma,
|
|
}
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- type: bind
|
|
source: ./pgdata
|
|
target: /var/lib/postgresql/data
|
|
|
|
akkoma:
|
|
image: akkoma:latest
|
|
build: .
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
links:
|
|
- db
|
|
ports: [
|
|
# Uncomment/Change port mappings below as needed.
|
|
# The left side is your host machine, the right one is the akkoma container.
|
|
# You can prefix the left side with an ip.
|
|
|
|
# Webserver (for reverse-proxies outside of docker)
|
|
# If you use a dockerized proxy, you can leave this commented
|
|
# and use a container link instead.
|
|
"127.0.0.1:4000:4000",
|
|
]
|
|
volumes:
|
|
- .:/opt/akkoma
|
|
|
|
# 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
|
|
# links:
|
|
# - akkoma
|
|
# ports: [
|
|
# "443:443",
|
|
# "80:80"
|
|
# ]
|
|
# volumes:
|
|
# - ./docker-resources/Caddyfile:/etc/caddy/Caddyfile
|
|
# - ./caddy-data:/data
|
|
# - ./caddy-config:/config
|