mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-17 17:57:54 -05:00
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.
38 lines
763 B
YAML
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:
|