Merge branch 'main' of ssh://git.peroxy.dev:222/renttrent/peroxy_site
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
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 --build --force-recreate -d
|
||||
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 --build --force-recreate -d
|
||||
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"]
|
||||
|
||||
@@ -5,9 +5,9 @@ import { motion, AnimatePresence } from "framer-motion";
|
||||
import { Logo } from "./Logo";
|
||||
|
||||
const links = [
|
||||
{ name: "blog", href: "/blog" },
|
||||
{ name: "projects", href: "/projects" },
|
||||
{ name: "github", href: "https://git.peroxy.dev/kookroach" },
|
||||
{ name: "Blog", href: "/blog" },
|
||||
{ name: "Projects", href: "/projects" },
|
||||
{ name: "Gitea", href: "https://git.peroxy.dev/kookroach" },
|
||||
];
|
||||
export const Navbar = () => {
|
||||
const [showMenu, setShowMenu] = useState(false);
|
||||
|
||||
@@ -8,4 +8,6 @@ description: Short description
|
||||
|
||||
# First blog
|
||||
|
||||
Insane
|
||||
Insane
|
||||
|
||||
test change
|
||||
|
||||
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