1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-24 22:46:41 +07:00

update deploy

This commit is contained in:
Fedor Katurov 2023-12-30 13:34:22 +07:00
parent 2d2c959925
commit 6230217741
3 changed files with 11 additions and 95 deletions

View file

@ -12,5 +12,6 @@ RUN yarn build
WORKDIR /app/dist
COPY ./docker/wait-for-it.sh .
EXPOSE ${EXPOSE}
EXPOSE 80
CMD ["node", "./index.js"]

View file

@ -1,36 +1,18 @@
version: '3.7'
# Docker-compose for dev purposes only
version: "3.7"
services:
db:
restart: always
container_name: bot-${DRONE_BRANCH}__db
container_name: bot__db
image: postgres:11-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: bot
ports:
- "5432:5432"
volumes:
- bot-db:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
app:
container_name: bot-${DRONE_BRANCH}
restart: always
pull_policy: 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
- ${CONFIG_PATH}:/app/dist/common:ro
entrypoint: ./wait-for-it.sh -t 90 db:5432 -- node ./index.js --config /etc/bot/config.yml
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: