57 Commits

Author SHA1 Message Date
fbc1e55e5c Merge branch 'main' of ssh://git.mifi.dev:12022/mifi/auth 2023-05-09 19:15:25 -04:00
653fc7d52f promnotions 2023-05-09 19:15:01 -04:00
84881edb61 promnotions 2023-05-09 19:14:04 -04:00
c8b1b72694 New pipeline eventing 2023-05-09 19:08:17 -04:00
73cd1d794a Finalized drone pipeline (mostly)
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 18:52:31 -04:00
28ac23d8f2 Or one more...
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 18:30:26 -04:00
71b7519a53 Last try then go with what works
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 18:28:53 -04:00
28ee1a9d1e One works... but the other...
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 18:27:49 -04:00
f327c6e06e revert
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 18:18:14 -04:00
799ff00f9c Update pipeline. Again. Day 900 and something.
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-09 09:17:36 -04:00
369e3f4b5c !! 2023-05-08 19:26:53 -04:00
3788de2609 ??
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-08 19:24:42 -04:00
0f9aafe418 ........
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-08 19:15:07 -04:00
13b90e9ee6 .....
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 19:13:44 -04:00
6e19a6217d Go!
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-08 19:08:55 -04:00
34fd4e7304 ...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 19:05:41 -04:00
5e04012aa4 Zoom!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:59:13 -04:00
e8f2928543 Go!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:53:26 -04:00
91a3b2fabf Do just one thing...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:40:38 -04:00
964b9a03ef New pipeline...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:31:24 -04:00
bf693645d4 Lordy...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:22:37 -04:00
082b4826c2 image_pull_secrets
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 16:59:12 -04:00
e68c3002d8 And again...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 16:37:43 -04:00
30d2f4a644 Go!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 16:32:52 -04:00
875a45f2b8 Perchance to dream...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 16:18:00 -04:00
6bf7afbe09 Fix for deploy...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 16:01:07 -04:00
5c94dbbff5 Maybe? Maybe not... 2023-05-08 15:59:56 -04:00
cb44eb1fab Hmmm. More trouble with secrets
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 15:53:27 -04:00
df63d7947f better secret file
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 15:47:20 -04:00
01a5ff907c Perhaps a big duh.
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 15:37:18 -04:00
e22e3d8bc3 Muahahahaha 2023-05-08 15:33:48 -04:00
efecd78355 Publishing FTW
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 15:15:50 -04:00
ed4246ba0e testing secrets...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 15:08:49 -04:00
4acc228fe3 This one seems to be valid
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 14:57:15 -04:00
42279b0592 This. 2023-05-08 14:52:26 -04:00
e417ab64d8 Ah ha! Finally.
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 14:22:19 -04:00
93b11c3a35 Fallback to old working
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-08 14:07:40 -04:00
1ef2c4919e Maybe these odd changes?
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-07 00:57:46 -04:00
6ff8f74317 Or this?
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-07 00:55:59 -04:00
bf70ca98f3 Or this...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-07 00:54:41 -04:00
52e5befd93 Doubtful...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-07 00:53:29 -04:00
a047b49073 Last try, then pack 2023-05-06 10:18:39 -04:00
59b20578bb Maybe
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 10:15:03 -04:00
cdd6c6a72a Dammit
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 10:12:30 -04:00
1d16473d2d Ah ha!
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 10:10:02 -04:00
cd2bef9811 So broken...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 10:00:17 -04:00
62118b6d64 ERGGGGG
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:57:46 -04:00
8290b332fb Ugh
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:56:00 -04:00
61236719f4 Or this...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:55:09 -04:00
aa699d5009 Testing this... 2023-05-06 09:48:31 -04:00
9a4f9cdf4c Hmmm 2023-05-06 09:48:00 -04:00
5532fc51a9 Unbroken? 2023-05-06 09:45:05 -04:00
99db648a36 - Endlessly fighting the ENV - I should be loading from the package... 2023-05-06 09:40:25 -04:00
adcab6afcb Double dollar
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:28:24 -04:00
8e40c0a06c Tweaking the ENV
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:19:31 -04:00
db5e4858b8 More ENV updates
Some checks failed
continuous-integration/drone/push Build was killed
2023-05-06 09:10:45 -04:00
d800311ae7 - ENV updates
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:08:15 -04:00
6 changed files with 50 additions and 76 deletions

View File

@@ -61,14 +61,12 @@ trigger:
branch:
- main
event:
# - pull_request
- push
- pull_request
---
kind: pipeline
type: docker
name: Publish Pipeline
group: publish
workspace:
path: /drone/grow
@@ -80,16 +78,10 @@ steps:
- yarn install
- yarn build
- name: Publish NPM
image: plugins/npm
image: node:20-alpine
failure: ignore
settings:
username:
from_secret: registry_username
password:
from_secret: registry_password
registry: https://git.mifi.dev/api/packages/mifi/npm
token:
- from_secret: gitea_token
commands:
- yarn publish -t ${DRONE_TAG}
volumes:
- name: npmrc
path: /drone/grow/.npmrc
@@ -109,34 +101,18 @@ steps:
- success
- failure
- name: Publish Image
image: docker
commands:
- docker build -t git.mifi.dev/mifi/mifi/auth:latest -t git.mifi.dev/mifi/mifi/auth:${DRONE_TAG} .
- docker push git.mifi.dev/mifi/mifi/auth:latest
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /drone/grow/.docker/config.json
# - 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
image: plugins/docker
settings:
auto_tag: true
repo: git.mifi.dev/mifi/mifi/auth
registry: git.mifi.dev
debug: true
ssh-agent-key:
from_secret: reg_token
username: <token>
password:
from_secret: reg_token
secrets: [reg_token]
- name: Report Image Publish Status
image: plugins/webhook
settings:
@@ -168,10 +144,7 @@ depends_on:
- Test Pipeline
trigger:
# branch:
# - main
event:
# - push
- tag
---
@@ -186,13 +159,18 @@ steps:
- name: Deploy Container
image: docker
privileged: true
environment:
CONTAINER_PREFIX: staging
HOST: area51.mifi.dev
ROUTE_PREFIX: /auth
PORT: 9001
commands:
- docker compose -f docker-compose.staging.yml pull
- docker compose -f docker-compose.staging.yml build --no-cache
- docker compose -f docker-compose.staging.yml rm --stop
- docker compose -f docker-compose.staging.yml up --wait
volumes:
- name: env
- name: env-secrets
path: /drone/grow/staging.env
- name: dockersock
path: /var/run/docker.sock
@@ -222,7 +200,7 @@ volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: env
- name: env-secrets
host:
path: /volume1/docker/beethoven/labs-auth/staging.env
@@ -230,8 +208,7 @@ depends_on:
- Test Pipeline
trigger:
# branch:
# - main
event:
# - push
- tag
- promote
target:
- production

View File

@@ -27,5 +27,3 @@ RESET_VALID_MINUTES=15
DEFAULT_TOKEN_DAYS=1
CONTAINER_PREFIX=dev
SERVICE_NAME=auth-service
DB_TYPE=mongo

View File

@@ -1,13 +1,3 @@
# 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 ./
@@ -15,14 +5,14 @@ COPY tsconfig.json ./
COPY lib ./lib
RUN ls -a
RUN yarn install
RUN yarn build:production
RUN yarn build
## this is stage two , where the app actually runs
FROM node:20-alpine AS containerize
ENV NODE_ENV ${ENV:-production}
WORKDIR /home/node/app
COPY package*.json ./
RUN yarn install --frozen-lockfile --production
COPY --from=0 /home/node/app/dist .
EXPOSE 9001
EXPOSE 27017
EXPOSE ${PORT}
CMD ["node","server/index.js"]

View File

@@ -2,7 +2,10 @@ version: '3.8'
services:
auth-service_mongo:
env_file: dev.env
env_file: .env.dev
build:
args:
- CONTAINER_PREFIX=${CONTAINER_PREFIX}
container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo
ports:
- 27017:27017
@@ -14,8 +17,14 @@ services:
restart: unless-stopped
image: mongo:latest
auth-service:
env_file: dev.env
build: .
env_file: .env.dev
build:
context: .
args:
- HOST=${HOST}
- PORT=${PORT}
- ROUTE_PREFIX=${ROUTE_PREFIX}
- CONTAINER_PREFIX=${CONTAINER_PREFIX}
container_name: ${CONTAINER_PREFIX:-dev}-auth-service
ports:
- 9001:9001

View File

@@ -2,23 +2,23 @@ version: '3.8'
services:
auth-service_mongo:
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service_mongo
env_file: staging.env
container_name: ${CONTAINER_PREFIX}-auth-service_mongo
env_file:
- staging.env
networks:
- docknet
volumes:
- '/volume1/docker/labs/auth/mongo:/data/db'
# - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
restart: unless-stopped
image: mongo:latest
auth-service:
env_file: staging.env
env_file:
- staging.env
build: .
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service
container_name: ${CONTAINER_PREFIX}-auth-service
environment:
- DB_HOST=${CONTAINER_PREFIX:-mifi}-auth-service_mongo
- HOST=${HOST}
- PORT=${PORT}
- ROUTE_PREFIX=${ROUTE_PREFIX}
- DB_HOST=${CONTAINER_PREFIX}-auth-service_mongo
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.grow.rule=Host(`${HOST}`) && Path(`${ROUTE_PREFIX}`)'

View File

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