From 5a26a17c33109a0b62e81071ac5179e720a0fc4c Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 23 May 2019 09:42:46 +0200 Subject: [PATCH] traeffik --- .drone.yml | 48 ++++++++++++++++++++--------------------- docker-compose.prod.yml | 17 ++++++++++++++- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/.drone.yml b/.drone.yml index b0595c2..6e25fa9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: -# - docker-compose -f docker-compose.prod.yml down -# - docker-compose -f docker-compose.prod.yml up -d -# when: -# event: push -# branch: master \ No newline at end of file + - 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 \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index effb7b4..75618cd 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -5,6 +5,12 @@ x-defaults: &default restart: always working_dir: /app command: npm run prod + ports: + - 80 + +networks: + traefik: + external: true services: api: @@ -15,4 +21,13 @@ services: www: <<: *default volumes: - - ./www:/app \ No newline at end of file + - ./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 \ No newline at end of file