Compare commits
40 Commits
e46339c7a7
...
75e24a6a08
| Author | SHA1 | Date | |
|---|---|---|---|
| 75e24a6a08 | |||
| 5a9e65396c | |||
| 406183536e | |||
| 4be09b8100 | |||
| d71f599f0d | |||
| be1b6268e7 | |||
| d229d639fd | |||
| 74aa0ab925 | |||
| 281e0f4170 | |||
| e37f2f0212 | |||
| 144020b6d1 | |||
| 1c165a68cb | |||
| bbe50c4790 | |||
| 4c4e762a4a | |||
| d19966baba | |||
| c3f3a4914a | |||
| c714281330 | |||
| bf0e8e2c02 | |||
| a83e68ea73 | |||
| 49fc655de9 | |||
| 2a6198aa1f | |||
| e1e9a41d59 | |||
| 2abb8a1bfc | |||
| da4c565cb3 | |||
| 31c7e8ea27 | |||
| 25cd9c75ab | |||
| 2913688e63 | |||
| 77ae0a746b | |||
| 9ee61716d4 | |||
| 2ff40d856a | |||
| f1f84aec3d | |||
| a609afcefc | |||
| c77371b0a4 | |||
| 5f2853083f | |||
| 2cfcc3c892 | |||
| 611fe5f12b | |||
| 8f6b36eca1 | |||
| a833d2666a | |||
| 0e18750370 | |||
| d97e329f4c |
48
.drone.yml
48
.drone.yml
@@ -1,15 +1,41 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
name: prod-pipe
|
||||
|
||||
steps:
|
||||
- name: now
|
||||
image: one000mph/drone-now # Use one000mph's version as lucaperret's is outdated
|
||||
environment:
|
||||
NOW_TOKEN:
|
||||
from_secret: now_token # Refers to a secret in your drone repo titled "NOW_TOKEN"
|
||||
settings:
|
||||
secret: [now_token] # Refers to the above environment variable
|
||||
deploy_name: peroxy-dev # The name of your vercel project
|
||||
prod: true # Leave this if you want to deploy to production, remove to disable production
|
||||
# directory: public # Only if you've pre-rendered the page. Normally you let vercel handle this
|
||||
- name: prod
|
||||
image: docker/compose
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker-compose -f docker-compose.yml up -d --force-recreate
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
---
|
||||
kind: pipeline
|
||||
name: dev-pipe
|
||||
|
||||
steps:
|
||||
- name: dev
|
||||
image: docker/compose
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker-compose -f docker-compose.dev.yml up -d --force-recreate
|
||||
trigger:
|
||||
branch:
|
||||
- dev
|
||||
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
|
||||
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
#Creates a layer from node:alpine image.
|
||||
FROM node:alpine
|
||||
|
||||
#Creates directories
|
||||
RUN mkdir -p /usr/src/app
|
||||
|
||||
#Sets an environment variable
|
||||
ENV PORT 3000
|
||||
|
||||
#Sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, and ADD commands
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
#Copy new files or directories into the filesystem of the container
|
||||
COPY package.json /usr/src/app
|
||||
#COPY package-lock.json /usr/src/app
|
||||
|
||||
#Execute commands in a new layer on top of the current image and commit the results
|
||||
RUN npm install
|
||||
|
||||
##Copy new files or directories into the filesystem of the container
|
||||
COPY . /usr/src/app
|
||||
|
||||
#Execute commands in a new layer on top of the current image and commit the results
|
||||
RUN npm run build
|
||||
|
||||
#Informs container runtime that the container listens on the specified network ports at runtime
|
||||
EXPOSE 3000
|
||||
|
||||
#Allows you to configure a container that will run as an executable
|
||||
ENTRYPOINT ["npm", "run"]
|
||||
|
||||
22
docker-compose.dev.yml
Normal file
22
docker-compose.dev.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
peroxy_site_dev:
|
||||
container_name: peroxy_site_dev
|
||||
command: start
|
||||
build:
|
||||
context: .
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.peroxy_site_dev.entrypoints=https"
|
||||
- "traefik.http.routers.peroxy_site_dev.rule=Host(`test.peroxy.dev`)"
|
||||
- "traefik.http.routers.peroxy_site_dev.tls=true"
|
||||
- "traefik.http.routers.peroxy_site_dev.tls.certresolver=http"
|
||||
- "traefik.http.routers.peroxy_site_dev.service=peroxy_site_dev-service"
|
||||
- "traefik.http.services.peroxy_site_dev-service.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
peroxy_site:
|
||||
container_name: peroxy_site
|
||||
command: start
|
||||
build:
|
||||
context: .
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.peroxy_site.entrypoints=https"
|
||||
- "traefik.http.routers.peroxy_site.rule=Host(`peroxy.dev`, `www.peroxy.dev`)"
|
||||
- "traefik.http.routers.peroxy_site.tls=true"
|
||||
- "traefik.http.routers.peroxy_site.tls.certresolver=http"
|
||||
- "traefik.http.routers.peroxy_site.service=peroxy_site-service"
|
||||
- "traefik.http.services.peroxy_site-service.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
Reference in New Issue
Block a user