Files
FreshRSS/Docker/docker-compose.yml
Germs2004 20d0f9cd76 volume names include redundant prefix (#3108)
This proposed change includes tweaks to the names of the services and volumes, and adds an explicit label to the postgres and freshrss containers.

Using a more generic "freshrss-db" instead of "freshrss_postgresql" seems more standard among other docker projects and makes it a bit easier to switch databases later.

Removing the "freshrss_" prefix from the volume names solves a problem where the docker-compose automatically prepends a "project name" to volume names upon running "up".  So if your docker-compose.yml file is stored in a folder named "freshrss", you would end up with a redundant volume name of "freshrss_freshrss_data".

This also adds a restart policy to the db container.
2020-08-29 12:16:03 +02:00

38 lines
763 B
YAML

version: "3"
services:
freshrss-db:
image: postgres:12-alpine
container_name: freshrss-db
hostname: freshrss-db
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=freshrss
- POSTGRES_PASSWORD=freshrss
- POSTGRES_DB=freshrss
freshrss-app:
image: freshrss/freshrss:latest
container_name: freshrss-app
hostname: freshrss-app
restart: unless-stopped
ports:
- "8080:80"
depends_on:
- freshrss-db
volumes:
- data:/var/www/FreshRSS/data
- extensions:/var/www/FreshRSS/extensions
environment:
- CRON_MIN=*/20
- TZ=Europe/Copenhagen
labels:
- "traefik.port=80"
volumes:
db:
data:
extensions: