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