aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Germs2004 <5519340+Germs2004@users.noreply.github.com> 2020-08-29 06:16:03 -0400
committerGravatar GitHub <noreply@github.com> 2020-08-29 12:16:03 +0200
commit20d0f9cd762ce09f392a103abcfe1d18e2c63654 (patch)
tree17821b4c5bdeedead30e6861e612beb378c57a9d /Docker
parentec0dd94b0a9c95920e23b74606c158659c72132c (diff)
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.
Diffstat (limited to 'Docker')
-rw-r--r--Docker/docker-compose.yml27
1 files changed, 15 insertions, 12 deletions
diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml
index 5d0a2a8ab..e478f404e 100644
--- a/Docker/docker-compose.yml
+++ b/Docker/docker-compose.yml
@@ -1,27 +1,30 @@
version: "3"
services:
- freshrss_postgresql:
- image: postgres
- restart: unless-stopped
+ freshrss-db:
+ image: postgres:12-alpine
container_name: freshrss-db
+ hostname: freshrss-db
+ restart: unless-stopped
volumes:
- - pgsql_data:/var/lib/postgresql/data
+ - db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=freshrss
- POSTGRES_PASSWORD=freshrss
- POSTGRES_DB=freshrss
- freshrss:
- image: freshrss/freshrss
+ freshrss-app:
+ image: freshrss/freshrss:latest
+ container_name: freshrss-app
+ hostname: freshrss-app
restart: unless-stopped
ports:
- "8080:80"
depends_on:
- - freshrss_postgresql
+ - freshrss-db
volumes:
- - freshrss_data:/var/www/FreshRSS/data
- - freshrss_extensions:/var/www/FreshRSS/extensions
+ - data:/var/www/FreshRSS/data
+ - extensions:/var/www/FreshRSS/extensions
environment:
- CRON_MIN=*/20
- TZ=Europe/Copenhagen
@@ -29,6 +32,6 @@ services:
- "traefik.port=80"
volumes:
- pgsql_data:
- freshrss_data:
- freshrss_extensions:
+ db:
+ data:
+ extensions: