26 Commits

Author SHA1 Message Date
d011f15136 - Resolve version number issue
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 11:25:58 -04:00
ee398feeb9 Update pipelines
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 11:23:28 -04:00
c2d9f8be5a Update to v 0.0.4 2023-05-04 11:17:52 -04:00
5f69193b81 Annoying ass shit 2023-05-03 23:07:44 -04:00
2a13a433e1 this 2023-05-03 23:06:37 -04:00
b094ae2c9a Deploy 2023-05-03 23:00:55 -04:00
e48037a7d4 Tweaks 2023-05-03 22:57:22 -04:00
ecfa12154d Up version / publish 2023-05-03 22:37:21 -04:00
aa2611b68d Updates
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-03 19:46:24 -04:00
0a7bbb96c0 Why not?
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-03 17:05:53 -04:00
96c7061ace try this 2023-05-03 16:52:19 -04:00
6b39d138de Deploy reporting
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-03 16:40:30 -04:00
0d3571e859 last try then pause
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-03 16:36:07 -04:00
2a7172ddfe ?? 2023-05-03 16:33:00 -04:00
97ed5f1f43 ? 2023-05-03 16:31:42 -04:00
0e53dd8132 brokeb? 2023-05-03 16:29:03 -04:00
06c9c1d896 test 2023-05-03 16:26:26 -04:00
f29b50120f typo 2023-05-03 15:34:07 -04:00
cb75c651b9 Done 2023-05-03 15:33:24 -04:00
c83db307ad Dammit 2023-05-03 15:29:42 -04:00
45964e4f13 Ugh 2023-05-03 15:23:13 -04:00
0e3ff90e09 Done 2023-05-03 15:17:31 -04:00
8031b12940 Hmmm. 2023-05-03 15:13:56 -04:00
9073408f6d What about... 2023-05-03 15:11:41 -04:00
943ffe96d1 Erm..
Some checks failed
continuous-integration/drone/push Build was killed
2023-05-03 15:05:46 -04:00
6d07bbd9ad - Changes 2023-05-03 15:03:13 -04:00
5 changed files with 151 additions and 40 deletions

View File

@@ -93,35 +93,125 @@ trigger:
---
kind: pipeline
type: docker
name: Deploy Pipeline
name: Publish Pipeline
platform:
os: linux
arch: arm64
workspace:
path: /drone/grow
steps:
- name: yarn-install
image: node
- name: Build Service
image: node:latest
commands:
- cd /app
- cp /drone/src/package.json ./
- cp /drone/src/yarn.lock ./
- cp /drone/grow/package.json ./
- cp /drone/grow/yarn.lock ./
- yarn install --frozen-lockfile
- cp -r /drone/src/* .
- cp -r /drone/grow/* .
- yarn build
- name: Publish NPM
image: plugins/npm
settings:
username: mifi
registry: git.mifi.dev
token:
- from_secret: gitea_token
- name: Publish Image
image: plugins/docker
settings:
auto_tag: true
squash: true
repo: git.mifi.dev/mifi/auth
registry: git.mifi.dev
ssh-agent-key:
from_secret: gitea_token
volumes:
- name: app-build-dir
path: /app-build
- name: dockersock
Path: /var/run/docker.sock
- name: dockerconfig
Path: /.docker/config.json
- name: Send Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - New tagged docker image release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /volume1/docker/labs/grow-auth/dockerconfig.json
depends_on:
- Build Pipeline
trigger:
branch:
- main
event:
- tag
---
kind: pipeline
type: docker
name: Deploy Pipeline
workspace:
path: /drone/grow
# image_pull_secrets:
# - from_secret: gitea_token
steps:
- name: Deploy Container
image: compose
image: docker
commands:
- cd /app
- cp /app-build-dir/* .
- build
- up -d
- compose build .
- compose up --wait
volumes:
- name: app-build-dir
path: /app-build
volumes:
- name: app-build-dir
temp: {}
- name: env
path: /.env
- name: dockersock
Path: /var/run/docker.sock
- name: dockerconfig
Path: /.docker/config.json
- name: Send Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - Build # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
volumes:
- name: env
path: /volume1/docker/labs/grow-auth/.env
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /volume1/docker/labs/grow-auth/dockerconfig.json
depends_on:
- Build Pipeline
trigger:
branch:
- main
event:
- tag

View File

@@ -1,7 +1,27 @@
FROM node:latest
WORKDIR /app
COPY package.json .
# FROM node:20-alpine AS build
# RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
# WORKDIR /home/node/app
# COPY package*.json .
# COPY dist/lib .
# USER node
# RUN yarn install --frozen-lockfile --production
# COPY --chown=node:node node_modules ./node_modules
# CMD ["node", "dist/lib/server/index.js"]
FROM node:20-alpine AS build
WORKDIR /home/node/app
COPY package*.json ./
COPY tsconfig.json ./
COPY lib ./lib
RUN ls -a
RUN yarn install
COPY . .
RUN yarn build
CMD ["node", "dist/lib/server/index.js"]
RUN yarn build:production
## this is stage two , where the app actually runs
FROM node:20-alpine AS containerize
WORKDIR /home/node/app
COPY package*.json ./
RUN yarn install --frozen-lockfile --production
COPY --from=0 /home/node/app/dist .
EXPOSE 80
CMD ["node","server/index.js"]

View File

@@ -2,29 +2,29 @@ version: '3.8'
services:
auth-service_mongo:
container_name: ${CONTAINER_PREFIX}auth-service_mongo
container_name: ${CONTAINER_PREFIX}${SERVICE_NAME}_${DB_TYPE}
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MONGODB_USERNAME=${DB_USER}
- MONGODB_PASSWORD=${DB_PASS}
- MONGODB_DATABASE=${DB_NAME}
- MONGO_INITDB_ROOT_USERNAME=${DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASS}
- MONGO_INITDB_DATABASE=${DB_NAME}
networks:
- docknet
volumes:
- '/volume1/docker/labs/grow-auth/mongo:/data/db'
- '/Volume1/docker/labs/grow-auth/.env:./.env'
restart: unless-stopped
image: mongo
auth-service:
container_name: ${CONTAINER_PREFIX}auth-service
build: .
container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME}
environment:
- PORT=${PORT}
- ROUTE_PREFIX=${ROUTE_PREFIX}
- LOGIN_ROUTE=${LOGIN_ROUTE}
- RESET_ROUTE=${RESET_ROUTE}
- DB_HOST=${CONTAINER_PREFIX}auth-service_mongo
- DB_HOST=${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASS}
- DB_PASS=${DB_PASS}
- DB_NAME=${DB_NAME}
- SESSION_KEY=${SESSION_KEY}
- JWT_AUDIENCE=${JWT_AUDIENCE}
@@ -45,8 +45,8 @@ services:
networks:
- docknet
volumes:
- '/Volume1/docker/.yarnrc.yml:./.yarnrc.yml'
- '/Volume1/docker/labs/grow-auth/.env:./.env'
- '/Volume1/docker/.yarnrc.yml:/.yarnrc.yml'
- '/Volume1/docker/labs/grow-auth/.env:/.env'
restart: unless-stopped
image: node
depends_on:

View File

@@ -1,10 +1,11 @@
{
"name": "@mifi/auth",
"version": "0.0.2",
"version": "0.0.6",
"author": "mifi (Mike Fitzpatrick)",
"license": "MIT",
"scripts": {
"build": "tsc",
"build:production": "tsc -p .",
"format": "prettier:fix && lint:fix",
"lint": "eslint --ext .ts,.tsx lib/",
"lint:fix": "eslint --fix --ext .ts,.tsx lib/",

View File

@@ -6,7 +6,7 @@
"emitDecoratorMetadata": true,
"noImplicitAny": true,
"outDir": "./dist/",
"rootDirs": ["lib", "../"],
"rootDirs": ["lib"],
"sourceMap": true
}
}