77 Commits

Author SHA1 Message Date
ad9ffc89b5 With links and fixed names...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 09:09:06 -04:00
f482750d08 this may break everything...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 08:47:54 -04:00
7b77df0c4c v0.0.13 - fixed triggers perhaps...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 08:32:17 -04:00
8ee5d627aa Resolving stupid errors
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 08:21:02 -04:00
775dd60b56 Mostly passing pipelines, still a broken deploy... 2023-05-05 08:19:29 -04:00
b3365607c5 Muahahahha 2023-05-04 23:28:40 -04:00
96058995be New approach...
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 23:19:45 -04:00
1d43b78590 More...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 23:12:09 -04:00
243682758a clean-up
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 23:07:48 -04:00
695c4d84e8 Add npmrc, update version, pipeline tweaks - re-enable pipeline in full
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 23:05:49 -04:00
25908dd9d7 Failing on the same old errors...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 22:18:19 -04:00
34a28b8134 No cache
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 22:08:27 -04:00
7e1f9a1f33 So close I can taste it...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 22:00:41 -04:00
f0ba205a58 Closer? that was a new error...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 21:51:54 -04:00
1a717cd83e Not likely....
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 21:49:37 -04:00
1e932d97c8 Probably not 2023-05-04 21:43:58 -04:00
d879de2a6b Maybe a fix for the volume syntax?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:41:00 -04:00
34e3eb04af Ooops
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-05-04 21:31:16 -04:00
ff5f88588e Auth? 2023-05-04 21:30:25 -04:00
ac5c09b7da Or maybe add the registry to the package.json...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:17:59 -04:00
d1b42fe79f Remove registry from package.json
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:13:01 -04:00
3d32c77bd1 That command never played nice...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:05:57 -04:00
8e077810f5 Maybe these path changes will do the trick fixing the volume issues
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 21:04:29 -04:00
5e0621e37d Copy env into workspace?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:59:54 -04:00
e6f9f9b523 Fix naming collision
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:53:13 -04:00
1c5fdabca6 Recombine Steps
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 20:48:13 -04:00
7bbb4bb036 A bit more...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:39:38 -04:00
159f87d07e HOST!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:36:07 -04:00
244db86113 Trying with the .env file copied in
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:27:29 -04:00
00d9a4f734 Rollback!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:21:15 -04:00
b7a3c12eff again
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 19:57:25 -04:00
8e263d7ace Rollback 2023-05-04 19:54:36 -04:00
641cbcfd47 but why?
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 19:51:44 -04:00
8af84d42e5 Broken?
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 19:44:57 -04:00
d31a47f46c This!
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 19:42:30 -04:00
ddb8ad0948 Or...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 19:40:33 -04:00
73cb0c23f5 Or this?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 19:37:08 -04:00
59738f5711 Hmmm...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 19:33:52 -04:00
f3ff19098b privileged
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 12:28:32 -04:00
8bc852fa7d Secrets! 2023-05-04 12:26:23 -04:00
8e06b98695 Parallel publishing
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 12:15:59 -04:00
809255baa6 Last try before lunch
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 12:12:44 -04:00
21e80ca883 try dind
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 12:09:53 -04:00
cfb7c7e453 Do the things. Again.
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 12:04:53 -04:00
82498e7714 not frozen
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 11:44:52 -04:00
87a611459a ...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 11:43:02 -04:00
0a09208766 ... 2023-05-04 11:42:32 -04:00
99ce364dc4 Ugh 2023-05-04 11:41:54 -04:00
2daa33f3ac Still can't publish or deploy... 2023-05-04 11:41:16 -04:00
2814c6820b Perhaps...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 11:32:09 -04:00
d9cafe009d Pipeline triggers 2023-05-04 11:28:12 -04:00
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 192 additions and 72 deletions

View File

@@ -10,23 +10,19 @@ steps:
image: node:latest
commands:
- yarn install
- name: Code Style Checks
image: node:latest
commands:
- yarn prettier
- name: Lint
image: node:latest
commands:
- yarn lint
- name: Unit Tests
image: node:latest
commands:
- yarn test
- name: Send Status Notification
- name: Send Test Status Notification
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
@@ -41,34 +37,14 @@ steps:
status:
- success
- failure
trigger:
event:
- push
---
kind: pipeline
type: docker
name: Build Pipeline
workspace:
path: /drone/grow
steps:
- name: yarn install
image: node:latest
commands:
- yarn install
- name: Build
image: node:latest
commands:
- yarn build
- name: Send Status Notifications
- name: Send Build Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json
template: |
{
@@ -81,6 +57,103 @@ steps:
- success
- failure
trigger:
branch:
- main
event:
- pull_request
- push
---
kind: pipeline
type: docker
name: Publish Pipeline
group: publish
workspace:
path: /drone/grow
steps:
- name: Build Package
image: node:latest
commands:
- yarn install
- yarn build
- name: Publish NPM
image: plugins/npm
failure: ignore
settings:
username:
from_secret: registry_username
password:
from_secret: registry_password
registry: https://git.mifi.dev
token:
- from_secret: gitea_token
volumes:
- name: npmrc
path: /drone/grow/.npmrc
- name: Report NPM Publish Status
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 npm package release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
- name: Publish Image
image: plugins/docker
settings:
auto_tag: true
squash: true
repo: git.mifi.dev/mifi/auth
context: mifi
registry: git.mifi.dev
username:
from_secret: registry_username
password:
from_secret: registry_password
ssh-agent-key:
from_secret: gitea_token
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /drone/grow/.docker/config.json
- name: Report Image Publish Status
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 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: dockerconfig
host:
path: /volume1/docker/dockerconfig.json
- name: dockersock
host:
path: /var/run/docker.sock
- name: npmrc
host:
path: /volume1/docker/grow/labs-auth/.npmrc
depends_on:
- Test Pipeline
@@ -89,39 +162,66 @@ trigger:
- main
event:
- push
- tag
---
kind: pipeline
type: docker
name: Deploy Pipeline
platform:
os: linux
arch: arm64
workspace:
path: /drone/grow
steps:
- name: yarn-install
image: node
commands:
- cd /app
- cp /drone/src/package.json ./
- cp /drone/src/yarn.lock ./
- yarn install --frozen-lockfile
- cp -r /drone/src/* .
- yarn build
volumes:
- name: app-build-dir
path: /app-build
- name: Deploy Container
image: compose
image: docker
privileged: true
commands:
- cd /app
- cp /app-build-dir/* .
- build
- up -d
- docker compose pull
- docker compose build --no-cache
- docker compose rm --stop .
- docker compose up --wait
volumes:
- name: app-build-dir
path: /app-build
volumes:
- name: app-build-dir
temp: {}
- name: env
path: /drone/grow/.env
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /drone/grow/.docker/config.json
- name: Send Status Notifications
image: plugins/webhook
privileged: true
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: dockerconfig
host:
path: /volume1/docker/dockerconfig.json
- name: dockersock
host:
path: /var/run/docker.sock
- name: env
host:
path: /volume1/docker/labs/grow-auth/.env
depends_on:
- Test Pipeline
trigger:
branch:
- main
event:
- push
- tag

View File

@@ -1,7 +1,26 @@
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 .
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}
@@ -44,11 +44,10 @@ services:
- 'traefik.http.services.gitea.loadbalancer.server.port=${PORT}'
networks:
- docknet
volumes:
- '/Volume1/docker/.yarnrc.yml:./.yarnrc.yml'
- '/Volume1/docker/labs/grow-auth/.env:./.env'
restart: unless-stopped
image: node
links:
- auth-service_mongo:${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
depends_on:
- auth-service_mongo
networks:

View File

@@ -1,10 +1,11 @@
{
"name": "@mifi/auth",
"version": "0.0.2",
"version": "0.0.15",
"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/",
@@ -79,5 +80,6 @@
"repository": {
"type": "git",
"url": "https://git.mifi.dev/mifi/auth.git"
}
},
"registry": "https://git.mifi.dev"
}

View File

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