This commit is contained in:
cupcakearmy 2019-05-23 09:42:46 +02:00
parent 0b0177d089
commit 5a26a17c33
2 changed files with 40 additions and 25 deletions

View File

@ -22,27 +22,27 @@ steps:
- npm i --only=prod
# - name: deploy
# image: cupcakearmy/drone-deploy
# pull: always
# environment:
# PLUGIN_KEY:
# from_secret: ssh_key
# settings:
# host: nicco.io
# user: root
# port: 1312
# target: /srv/web/obolus
# sources:
# - ./api/dist
# - ./api/node_modules
# - ./www/.next
# - ./www/server.js
# - ./www/node_modules
# - ./docker-compose.prod.yml
# commands:
- name: deploy
image: cupcakearmy/drone-deploy
pull: always
environment:
PLUGIN_KEY:
from_secret: ssh_key
settings:
host: nicco.io
user: root
port: 1312
target: /srv/web/obolus
sources:
- ./api/dist
- ./api/node_modules
- ./www/.next
- ./www/server.js
- ./www/node_modules
- ./docker-compose.prod.yml
commands:
# - docker-compose -f docker-compose.prod.yml down
# - docker-compose -f docker-compose.prod.yml up -d
# when:
# event: push
# branch: master
when:
event: push
branch: master

View File

@ -5,6 +5,12 @@ x-defaults: &default
restart: always
working_dir: /app
command: npm run prod
ports:
- 80
networks:
traefik:
external: true
services:
api:
@ -16,3 +22,12 @@ services:
<<: *default
volumes:
- ./www:/app
networks:
- default
- traefik
labels:
- traefik.enable=true
- traefik.port=80
- traefik.docker.network=traefik
- traefik.backend=obolus
- traefik.frontend.rule=Host:obolus.nicco.io