mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-24 22:46:41 +07:00
36 lines
879 B
YAML
36 lines
879 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
|
|
build:
|
|
context: ../
|
|
dockerfile: ./docker/Dockerfile
|
|
ports:
|
|
- ${EXPOSE}:80
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- node_modules:/app/node_modules
|
|
entrypoint: ./wait-for-it.sh -t 90 db:5432 -- node ./index.js
|
|
depends_on:
|
|
- db
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost", "||", "kill", "-s", "2", "1" ]
|
|
interval: 1h
|
|
timeout: 1m
|
|
volumes:
|
|
bot-db:
|
|
node_modules:
|