Preserve the production network and normalize runtime image permissions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -48,6 +48,7 @@ COPY --chown=lottery:lottery main.py alembic.ini ./
|
||||
|
||||
# Создаем необходимые директории
|
||||
RUN mkdir -p /app/logs /app/data && \
|
||||
chmod -R u=rwX,go=rX /app && \
|
||||
chown -R lottery:lottery /app
|
||||
|
||||
# Переключаемся на непривилегированного пользователя
|
||||
|
||||
@@ -4,6 +4,7 @@ services:
|
||||
profiles: [local-db]
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
networks: [lottery_network]
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-lottery_bot}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-lottery_bot}
|
||||
@@ -21,6 +22,7 @@ services:
|
||||
image: redis:7-alpine
|
||||
container_name: lottery_redis
|
||||
restart: unless-stopped
|
||||
networks: [lottery_network]
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
@@ -35,6 +37,7 @@ services:
|
||||
build: .
|
||||
container_name: lottery_bot
|
||||
restart: unless-stopped
|
||||
networks: [lottery_network]
|
||||
init: true
|
||||
env_file: .env.prod
|
||||
environment:
|
||||
@@ -56,3 +59,7 @@ volumes:
|
||||
bot_data:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
lottery_network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user