aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
Diffstat (limited to 'Docker')
-rw-r--r--Docker/README.md17
-rw-r--r--Docker/docker-compose.yml36
2 files changed, 52 insertions, 1 deletions
diff --git a/Docker/README.md b/Docker/README.md
index 1767ae85d..c333329d4 100644
--- a/Docker/README.md
+++ b/Docker/README.md
@@ -75,7 +75,7 @@ sudo docker run -d --restart unless-stopped --log-opt max-size=10m \
```sh
# Rebuild an image (see build section above) or get a new online version:
sudo docker pull freshrss/freshrss
-# And then
+# And then
sudo docker stop freshrss
sudo docker rename freshrss freshrss_old
# See the run section above for the full command
@@ -155,3 +155,18 @@ ls /var/www/FreshRSS/
Use a reverse proxy on your host server, such as [Træfik](https://traefik.io/)
or [nginx](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/),
with HTTPS, for instance using [Let’s Encrypt](https://letsencrypt.org/).
+
+### Example with [docker-compose](https://docs.docker.com/compose/)
+
+A `docker-compose.yml` file is given as an example, using PostgreSQL. In order to use it, you have to adapt:
+- In the `postgresql` service:
+ * the `volumes` section;
+ * the `POSTGRES_PASSWORD` in the `environment` section;
+- In the `freshrss` service:
+ * the `volumes` section;
+ * options under the `labels` section are specific to [Træfik](https://traefik.io/), a reverse proxy. If you are not using it, feel free to delete this section. If you are using it, adapt accordingly to your config, especially the `traefik.frontend.rule` option.
+
+You can then launch the stack (postgres + freshrss) with:
+```sh
+docker-compose up -d
+```
diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml
new file mode 100644
index 000000000..a57f214da
--- /dev/null
+++ b/Docker/docker-compose.yml
@@ -0,0 +1,36 @@
+version: '2.3'
+
+services:
+ postgresql:
+ image: postgres:latest
+ restart: unless-stopped
+ volumes:
+ - '/path/to/pgsql-data:/var/lib/postgresql/data:Z'
+ environment:
+ - POSTGRES_USER=freshrss
+ - POSTGRES_PASSWORD=password
+ - POSTGRES_DB=freshrss
+
+ freshrss:
+ image: freshrss/freshrss:latest
+ restart: unless-stopped
+ depends_on:
+ - postgresql
+ networks:
+ - web
+ - default
+ volumes:
+ - '/your/local/directory/data:/var/www/FreshRSS/data:Z'
+ labels:
+ - "traefik.backend=freshrss"
+ - "traefik.docker.network=web"
+ - "traefik.frontend.rule=Host:rss.example.com"
+ - "traefik.enable=true"
+ - "traefik.default.protocol=http"
+ - "traefik.frontend.entryPoints=http,https"
+ - "traefik.port=80"
+
+networks:
+ web:
+ external: true
+