update docker-compose.yml
* added shared config for both containers * added restart to proxy
This commit is contained in:
@@ -8,7 +8,7 @@ workflow:
|
||||
- when: never
|
||||
|
||||
stages:
|
||||
- test
|
||||
# - test
|
||||
- build
|
||||
- pre_push
|
||||
- push
|
||||
@@ -18,6 +18,7 @@ test:
|
||||
image: python:3.11-alpine
|
||||
script:
|
||||
- pip install -q -r requirements.txt
|
||||
- pip install -q pytest~=8.3.5
|
||||
- python -m unittest discover tests
|
||||
|
||||
build:
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
x-conf: &conf
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
dns:
|
||||
- 9.9.9.9
|
||||
networks:
|
||||
rss-proxy_net:
|
||||
|
||||
services:
|
||||
<<: *conf
|
||||
proxy:
|
||||
image: registry.beaconborn.ru/bacon/rss-proxy:latest
|
||||
container_name: proxy
|
||||
@@ -7,8 +16,8 @@ services:
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- CACHE_TTL=3600
|
||||
depends_on:
|
||||
- redis
|
||||
restart: unless-stopped
|
||||
depends_on: redis
|
||||
healthcheck:
|
||||
test: [ "CMD", "python3", "/proxy/test.py" ]
|
||||
interval: 30s
|
||||
@@ -24,8 +33,6 @@ services:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "ping" ]
|
||||
interval: 10s
|
||||
@@ -34,3 +41,6 @@ services:
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
rss-proxy_net:
|
||||
Reference in New Issue
Block a user