mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-24 22:46:41 +07:00
#5 added docker-compose
This commit is contained in:
parent
f88d1f9312
commit
af5f444092
2 changed files with 54 additions and 2 deletions
53
.drone.yml
53
.drone.yml
|
@ -7,7 +7,7 @@ platform:
|
|||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
when:
|
||||
branch:
|
||||
|
@ -22,3 +22,54 @@ steps:
|
|||
from_secret: docker_repo
|
||||
registry:
|
||||
from_secret: docker_registry
|
||||
- name: upload
|
||||
image: drillster/drone-rsync
|
||||
when:
|
||||
branch:
|
||||
- develop
|
||||
environment:
|
||||
BUILD_PATH:
|
||||
from_secret: build_path
|
||||
PLUGIN_ARGS: -zz -O --no-perms
|
||||
settings:
|
||||
user:
|
||||
from_secret: rsync_user
|
||||
key:
|
||||
from_secret: rsync_key
|
||||
port:
|
||||
from_secret: rsync_port
|
||||
hosts:
|
||||
- ${rsync_host}
|
||||
source: ./
|
||||
target: ${BUILD_PATH}/${DRONE_BRANCH}
|
||||
include:
|
||||
- "docker/docker-compose.yml"
|
||||
prescript:
|
||||
- rm -rf $${BUILD_PATH}/${DRONE_BRANCH}
|
||||
- mkdir -p $${BUILD_PATH}/${DRONE_BRANCH}
|
||||
exclude:
|
||||
- "*"
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
when:
|
||||
branch:
|
||||
- develop
|
||||
environment:
|
||||
BUILD_PATH:
|
||||
from_secret: build_path
|
||||
ENV_PATH:
|
||||
from_secret: env_path
|
||||
settings:
|
||||
port:
|
||||
from_secret: rsync_port
|
||||
host:
|
||||
from_secret: rsync_host
|
||||
username:
|
||||
from_secret: rsync_user
|
||||
key:
|
||||
from_secret: rsync_key
|
||||
envs: [build_path, env_path]
|
||||
script_stop: true
|
||||
script:
|
||||
- DRONE_BRANCH=${DRONE_BRANCH} CONFIG_PATH=${ENV_PATH}/${DRONE_BRANCH}/config.yml docker-compose -f ./docker/docker-compose.yml --env-file ${ENV_PATH}/${DRONE_BRANCH}/.env build
|
||||
- DRONE_BRANCH=${DRONE_BRANCH} CONFIG_PATH=${ENV_PATH}/${DRONE_BRANCH}/config.yml docker-compose -f ./docker/docker-compose.yml --env-file ${ENV_PATH}/${DRONE_BRANCH}/.env up -d
|
||||
|
|
|
@ -23,7 +23,8 @@ services:
|
|||
- ${EXPOSE}:80
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
entrypoint: ./wait-for-it.sh -t 90 db:5432 -- node ./index.js
|
||||
- ${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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue