1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-24 22:46:41 +07:00
vk-tg-bot/docker/docker-compose.yml
2021-05-17 15:43:49 +07:00

34 lines
882 B
YAML

version: '3.4'
services:
db:
restart: always
container_name: bot-${DRONE_BRANCH}__db
image: postgres:11-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: bot
volumes:
- bot-db:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
app:
container_name: bot-${DRONE_BRANCH}
restart: always
environment:
PORT: 80
image: ${DOCKER_REPO}:${DRONE_BRANCH}
ports:
- ${EXPOSE}:80
volumes:
- /etc/localtime:/etc/localtime:ro
- ${CONFIG_PATH}:/etc/bot/config.yml:ro
entrypoint: ./wait-for-it.sh -t 90 db:5432 -- node --config /etc/bot/config.yml ./index.js
depends_on:
- db
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost || kill -s 2 1" ]
interval: 30m
timeout: 1m
start_period: 5m
volumes:
bot-db: