mirror of
https://github.com/cupcakearmy/fantus.git
synced 2024-11-01 04:54:13 +01:00
deployment
This commit is contained in:
parent
d8f8208bc2
commit
476ce70a7f
34
.drone.yml
Normal file
34
.drone.yml
Normal file
@ -0,0 +1,34 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:alpine
|
||||
pull: always
|
||||
commands:
|
||||
- node -v
|
||||
- yarn -v
|
||||
- yarn
|
||||
- yarn run build
|
||||
|
||||
- name: deploy
|
||||
image: cupcakearmy/drone-deploy
|
||||
pull: always
|
||||
environment:
|
||||
PLUGIN_KEY:
|
||||
from_secret: ssh_key
|
||||
settings:
|
||||
host: fantus.studio
|
||||
user: root
|
||||
port: 1312
|
||||
target: /srv/web/fantus
|
||||
sources:
|
||||
- ./docker-compose.prod.yml
|
||||
- ./package.json
|
||||
- ./next.config.js
|
||||
- ./.next
|
||||
commands:
|
||||
- docker-compose -f docker-compose.prod.yml up -d --build
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM node:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
RUN yarn
|
||||
|
||||
COPY next.config.js .
|
||||
COPY .env .
|
||||
|
||||
CMD [ "yarn", "run", "start" ]
|
22
docker-compose.prod.yml
Normal file
22
docker-compose.prod.yml
Normal file
@ -0,0 +1,22 @@
|
||||
version: '3.7'
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
|
||||
front:
|
||||
build: .
|
||||
ports:
|
||||
- 80
|
||||
volumes:
|
||||
- ./.next:/app/.next
|
||||
networks:
|
||||
- traefik
|
||||
labels:
|
||||
- 'traefik.enable=true'
|
||||
- 'traefik.backend=fantus'
|
||||
- 'traefik.docker.network=traefik'
|
||||
- 'traefik.frontend.rule=Host:fantus.studio'
|
||||
- 'traefik.port=80'
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
front:
|
||||
build: .
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./.next:/app/.next:ro
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "next -p 80",
|
||||
"build": "next build",
|
||||
"build": "rm -rf .next && next build && rm -rf .next/cache",
|
||||
"start": "next start -p 80"
|
||||
},
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user