17 Commits

Author SHA1 Message Date
d5f9bc4d05 fix bad commands
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 09:20:14 -04:00
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
4 changed files with 104 additions and 138 deletions

View File

@@ -1,96 +1,70 @@
# kind: pipeline kind: pipeline
# type: docker type: docker
# name: Test Pipeline name: Test Pipeline
# workspace: workspace:
# path: /drone/grow path: /drone/grow
# steps: steps:
# - name: yarn install - name: yarn install
# image: node:latest image: node:latest
# commands: commands:
# - yarn install - 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 Test Status Notification
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
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 }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
- name: Build
image: node:latest
commands:
- yarn build
- name: Send Build Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
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 }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
# - name: Code Style Checks trigger:
# image: node:latest branch:
# commands: - main
# - yarn prettier event:
- pull_request
- push
# - name: Lint ---
# image: node:latest
# commands:
# - yarn lint
# - name: Unit Tests
# image: node:latest
# commands:
# - yarn test
# - name: Send Status Notification
# image: plugins/webhook
# settings:
# urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
# 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 }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
# "username":"DroneBot"
# }
# when:
# 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
# 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 }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
# "username":"DroneBot"
# }
# when:
# status:
# - success
# - failure
# depends_on:
# - Test Pipeline
# trigger:
# branch:
# - main
# event:
# - push
# ---
kind: pipeline kind: pipeline
type: docker type: docker
name: Publish Pipeline name: Publish Pipeline
@@ -100,21 +74,11 @@ workspace:
path: /drone/grow path: /drone/grow
steps: steps:
- name: Build Service - name: Build Package
image: node:latest image: node:latest
commands: commands:
- yarn install - yarn install
- yarn build - yarn build
- name: NPM Auth
image: robertstettner/drone-npm-auth
settings:
username:
from_secret: registry_username
password:
from_secret: registry_password
email: mike@fitz.guru
registry: https://git.mifi.dev
scope: mifi
- name: Publish NPM - name: Publish NPM
image: plugins/npm image: plugins/npm
failure: ignore failure: ignore
@@ -127,8 +91,8 @@ steps:
token: token:
- from_secret: gitea_token - from_secret: gitea_token
volumes: volumes:
- name: yarnrc - name: npmrc
path: /drone/grow/.yarnrc.yml path: /drone/grow/.npmrc
- name: Report NPM Publish Status - name: Report NPM Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
@@ -150,6 +114,7 @@ steps:
auto_tag: true auto_tag: true
squash: true squash: true
repo: git.mifi.dev/mifi/auth repo: git.mifi.dev/mifi/auth
context: mifi
registry: git.mifi.dev registry: git.mifi.dev
username: username:
from_secret: registry_username from_secret: registry_username
@@ -159,9 +124,9 @@ steps:
from_secret: gitea_token from_secret: gitea_token
volumes: volumes:
- name: dockersock - name: dockersock
Path: /var/run/docker.sock path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
Path: /drone/grow/.docker/config.json path: /drone/grow/.docker/config.json
- name: Report Image Publish Status - name: Report Image Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
@@ -179,24 +144,25 @@ steps:
- failure - failure
volumes: volumes:
- name: yarnrc - name: dockerconfig
host: host:
path: /Volume1/docker/.yarnrc.yml path: /volume1/docker/dockerconfig.json
- name: dockersock - name: dockersock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: dockerconfig - name: npmrc
host: host:
path: /volume1/docker/labs/grow-auth/dockerconfig.json path: /volume1/docker/grow/labs-auth/.npmrc
# depends_on: depends_on:
# - Build Pipeline - Test Pipeline
trigger: trigger:
branch: branch:
- main - main
# event: event:
# - tag - push
- tag
--- ---
kind: pipeline kind: pipeline
@@ -206,24 +172,25 @@ name: Deploy Pipeline
workspace: workspace:
path: /drone/grow path: /drone/grow
# image_pull_secrets:
# - from_secret: gitea_token
steps: steps:
- name: Deploy Container - name: Deploy Container
image: docker image: docker
privileged: true
commands: commands:
- docker compose build - docker compose pull
- docker compose build --no-cache
- docker compose rm --stop
- docker compose up --wait - docker compose up --wait
volumes: volumes:
- name: env - name: env
path: /drone/grow/.env path: /drone/grow/.env
- name: dockersock - name: dockersock
Path: /var/run/docker.sock path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
Path: /drone/grow/.docker/config.json path: /drone/grow/.docker/config.json
- name: Send Status Notifications - name: Send Status Notifications
image: plugins/webhook image: plugins/webhook
privileged: true
settings: settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json content_type: application/json
@@ -239,21 +206,22 @@ steps:
- failure - failure
volumes: volumes:
- name: env - name: dockerconfig
host: host:
path: /volume1/docker/labs/grow-auth/.env path: /volume1/docker/dockerconfig.json
- name: dockersock - name: dockersock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: dockerconfig - name: env
host: host:
path: /volume1/docker/labs/grow-auth/dockerconfig.json path: /volume1/docker/labs/grow-auth/.env
# depends_on: depends_on:
# - Build Pipeline - Test Pipeline
trigger: trigger:
branch: branch:
- main - main
# event: event:
# - tag - push
- tag

View File

@@ -23,5 +23,4 @@ WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./
RUN yarn install --frozen-lockfile --production RUN yarn install --frozen-lockfile --production
COPY --from=0 /home/node/app/dist . COPY --from=0 /home/node/app/dist .
EXPOSE 80
CMD ["node","server/index.js"] CMD ["node","server/index.js"]

View File

@@ -2,7 +2,7 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
container_name: ${CONTAINER_PREFIX}${SERVICE_NAME}_${DB_TYPE} container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
environment: environment:
- ALLOW_EMPTY_PASSWORD=yes - ALLOW_EMPTY_PASSWORD=yes
- MONGO_INITDB_ROOT_USERNAME=${DB_USER} - MONGO_INITDB_ROOT_USERNAME=${DB_USER}
@@ -44,11 +44,10 @@ services:
- 'traefik.http.services.gitea.loadbalancer.server.port=${PORT}' - 'traefik.http.services.gitea.loadbalancer.server.port=${PORT}'
networks: networks:
- docknet - docknet
volumes:
- '/Volume1/docker/.yarnrc.yml:/.yarnrc.yml'
- '/Volume1/docker/labs/grow-auth/.env:/.env'
restart: unless-stopped restart: unless-stopped
image: node image: node
links:
- auth-service_mongo:${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
depends_on: depends_on:
- auth-service_mongo - auth-service_mongo
networks: networks:

View File

@@ -1,6 +1,6 @@
{ {
"name": "@mifi/auth", "name": "@mifi/auth",
"version": "0.0.7", "version": "0.0.16",
"author": "mifi (Mike Fitzpatrick)", "author": "mifi (Mike Fitzpatrick)",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {