mirror of
https://github.com/cupcakearmy/mnist.git
synced 2025-01-02 21:46:30 +00:00
deployment
This commit is contained in:
parent
7bd67d4079
commit
ec840d68f7
30
.drone.yml
Normal file
30
.drone.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:alpine
|
||||||
|
pull: always
|
||||||
|
commands:
|
||||||
|
- node -v
|
||||||
|
- yarn
|
||||||
|
- yarn run build
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: cupcakearmy/drone-deploy
|
||||||
|
pull: always
|
||||||
|
settings:
|
||||||
|
host: nicco.io
|
||||||
|
user: root
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port: 1312
|
||||||
|
target: /srv/web/mnist
|
||||||
|
sources:
|
||||||
|
- ./dist
|
||||||
|
- ./docker-compose.prod.yml
|
||||||
|
commands:
|
||||||
|
- docker-compose -f docker-compose.prod.yml up -d
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: master
|
19
docker-compose.prod.yml
Normal file
19
docker-compose.prod.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: yes
|
||||||
|
|
||||||
|
services:
|
||||||
|
server:
|
||||||
|
image: cupcakearmy/static
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./dist:/srv:ro
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.port=80
|
||||||
|
- traefik.backend=mnist
|
||||||
|
- traefik.frontend.rule=Host:mnist.nicco.io
|
Loading…
Reference in New Issue
Block a user