Портфолио: Папка для развертки под Docker
This commit is contained in:
parent
d6e00c56e7
commit
f6a2c1fa30
2 changed files with 16 additions and 18 deletions
38
Docker/docker-compose.yaml
Normal file
38
Docker/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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:
|
||||
image: redis:latest
|
||||
command:
|
||||
- redis-server
|
||||
container_name: ${REDIS_HOST}
|
||||
restart: on-failure
|
||||
ports:
|
||||
- ${REDIS_PORT}:${REDIS_PORT}
|
||||
environment:
|
||||
- REDIS_HOST=${REDIS_HOST}
|
||||
- REDIS_PORT=${REDIS_PORT}
|
||||
|
||||
|
||||
database:
|
||||
image: postgres:15
|
||||
container_name: ${POSTGRES_HOST}
|
||||
ports:
|
||||
- ${POSTGRES_PORT}:${POSTGRES_PORT}
|
||||
restart: on-failure
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in a new issue