diff --git a/Dockerfile.linux.amd64 b/Dockerfile.linux.amd64 index 9c9d6fc..980322c 100644 --- a/Dockerfile.linux.amd64 +++ b/Dockerfile.linux.amd64 @@ -29,9 +29,11 @@ ADD overlay/ / VOLUME /var/www/app/plugins.local VOLUME /var/www/app/feed-icons +VOLUME /var/www/app/themes.local EXPOSE 80 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +HEALTHCHECK --interval 30s --timeout 10s --retries 5 CMD wget --quiet --tries=1 --spider http://localhost WORKDIR /var/www/app CMD [] diff --git a/README.md b/README.md index 6c41baf..8f0688d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Compatible with docker-compose v2 schemas. ```Yaml --- -version: '2' +version: '2.1' services: ttrss: @@ -38,6 +38,7 @@ services: volumes: - plugins:/var/www/app/plugins.local - icons:/var/www/app/feed-icons + - themes:/var/www/app/themes.local db: image: postgres @@ -55,6 +56,8 @@ volumes: driver: local icons: driver: local + themes: + driver: local ``` ## Environment variables diff --git a/docker-compose.yml b/docker-compose.yml index c7277d2..3fc7a7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '2.1' services: ttrss: @@ -6,8 +6,12 @@ services: ports: - "80:80" depends_on: - - db - + - db + volumes: + - plugins:/var/www/app/plugins.local + - icons:/var/www/app/feed-icons + - themes:/var/www/app/themes.local + db: image: postgres environment: @@ -15,8 +19,14 @@ services: POSTGRES_PASSWORD: secure POSTGRES_DB: ttrss volumes: - - postgres_data:/var/lib/postgresql/data + - postgres_data:/var/lib/postgresql/data volumes: postgres_data: driver: local + plugins: + driver: local + icons: + driver: local + themes: + driver: local diff --git a/overlay/usr/local/bin/entrypoint.sh b/overlay/usr/local/bin/entrypoint.sh index abd1362..5f3ecd1 100755 --- a/overlay/usr/local/bin/entrypoint.sh +++ b/overlay/usr/local/bin/entrypoint.sh @@ -5,7 +5,9 @@ chown -R nginx:nginx /var/www/app/lock chown -R nginx:nginx /var/www/app/cache chown -R nginx:nginx /var/www/app/feed-icons +chown -R nginx:nginx /var/www/app/plugins.local +chown -R nginx:nginx /var/www/app/themes.local -s6-setuidgid nginx php7 /var/www/app/docker_setup.php +s6-setuidgid nginx php /var/www/app/docker_setup.php exec /bin/s6-svscan /etc/services.d