Портфолио: Папка для развертки под Docker

This commit is contained in:
Kirill Samoylenkov 2025-08-22 17:59:00 +07:00
parent d6e00c56e7
commit f6a2c1fa30
2 changed files with 16 additions and 18 deletions

View file

@ -12,4 +12,3 @@ RUN pip3 install -r requirements.txt
RUN chmod 755 . RUN chmod 755 .
COPY . . COPY . .

View file

@ -1,17 +1,27 @@
version: "3"
services: services:
bot:
build:
context: ..
dockerfile: Docker/Dockerfile
command: sh -c "pybabel compile -d ./Mousey/Locales -D bot && python -m Mousey to_update_telegram_profile"
container_name: mousey_bot
restart: always
depends_on:
- redis
- database
redis: redis:
image: redis:latest image: redis:latest
container_name: ${REDIS_HOST}
restart: on-failure
command: command:
- redis-server - redis-server
container_name: ${REDIS_HOST}
restart: on-failure
ports:
- ${REDIS_PORT}:${REDIS_PORT}
environment: environment:
- REDIS_HOST=${REDIS_HOST} - REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT} - REDIS_PORT=${REDIS_PORT}
ports:
- ${REDIS_PORT}:${REDIS_PORT}
database: database:
image: postgres:15 image: postgres:15
@ -24,16 +34,5 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB} POSTGRES_DB: ${POSTGRES_DB}
bot:
build:
context: .
dockerfile: ./Dockerfile
command: sh -c "pybabel compile -d ./Mousey/Locales -D bot && python -m Mousey to_update_telegram_profile"
restart: always
depends_on:
- redis
- database
volumes: volumes:
pgdata: pgdata: