27 Commits

Author SHA1 Message Date
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
5 changed files with 102 additions and 112 deletions

View File

@@ -1,74 +1,73 @@
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 # - name: Code Style Checks
image: node:latest # image: node:latest
commands: # commands:
- yarn prettier # - yarn prettier
- name: Lint # - name: Lint
image: node:latest # image: node:latest
commands: # commands:
- yarn lint # - yarn lint
- name: Unit Tests # - name: Unit Tests
image: node:latest # image: node:latest
commands: # commands:
- yarn test # - yarn test
- name: Send Test Status Notification # - name: Send Test Status Notification
image: plugins/webhook # image: plugins/webhook
settings: # settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r # urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json # content_type: application/json
template: | # template: |
{ # {
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png", # "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}}", # "text": "[{{ repo.name }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot" # "username":"DroneBot"
} # }
when: # when:
status: # status:
- success # - success
- failure # - failure
- name: Build # - name: Build
image: node:latest # image: node:latest
commands: # commands:
- yarn build # - yarn build
- name: Send Build Status Notifications # - name: Send Build Status Notifications
image: plugins/webhook # image: plugins/webhook
settings: # settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r # urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json # content_type: application/json
template: | # template: |
{ # {
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png", # "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}}", # "text": "[{{ repo.name }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot" # "username":"DroneBot"
} # }
when: # when:
status: # status:
- success # - success
- failure # - failure
trigger: # trigger:
branch: # branch:
- main # - main
event: # event:
# - pull_request # # - pull_request
- push # - push
--- # ---
kind: pipeline kind: pipeline
type: docker type: docker
name: Publish Pipeline name: Publish Pipeline
group: publish
workspace: workspace:
path: /drone/grow path: /drone/grow
@@ -110,33 +109,20 @@ steps:
- failure - failure
- name: Publish Image - name: Publish Image
image: docker image: docker
environemnt:
USERNAME:
from_secret: registry_username
PASSWORD:
from_secret: registry_password
commands: commands:
- docker build -t git.mifi.dev/mifi/mifi/auth:latest -t git.mifi.dev/mifi/mifi/auth:${DRONE_TAG} . - 'docker login -u $USERNAME -p $PASSWORD git.mifi.dev'
- '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 - docker push git.mifi.dev/mifi/mifi/auth:latest
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: 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 - name: Report Image Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
@@ -164,15 +150,15 @@ volumes:
host: host:
path: /volume1/docker/beethoven/labs-auth/.npmrc path: /volume1/docker/beethoven/labs-auth/.npmrc
depends_on: # depends_on:
- Test Pipeline # - Test Pipeline
trigger: trigger:
# branch: branch:
# - main - main
event: event:
# - push - push
- tag # - tag
--- ---
kind: pipeline kind: pipeline
@@ -186,13 +172,18 @@ steps:
- name: Deploy Container - name: Deploy Container
image: docker image: docker
privileged: true privileged: true
environment:
CONTAINER_PREFIX: staging
HOST: area51.mifi.dev
ROUTE_PREFIX: /auth
PORT: 9001
commands: commands:
- docker compose -f docker-compose.staging.yml pull - 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 build --no-cache
- docker compose -f docker-compose.staging.yml rm --stop - docker compose -f docker-compose.staging.yml rm --stop
- docker compose -f docker-compose.staging.yml up --wait - docker compose -f docker-compose.staging.yml up --wait
volumes: volumes:
- name: env - name: env-secrets
path: /drone/grow/staging.env path: /drone/grow/staging.env
- name: dockersock - name: dockersock
path: /var/run/docker.sock path: /var/run/docker.sock
@@ -222,16 +213,16 @@ volumes:
- name: dockersock - name: dockersock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: env - name: env-secrets
host: host:
path: /volume1/docker/beethoven/labs-auth/staging.env path: /volume1/docker/beethoven/labs-auth/staging.env
depends_on: # depends_on:
- Test Pipeline # - Test Pipeline
trigger: trigger:
# branch: branch:
# - main - main
event: event:
# - push - push
- tag # - tag

View File

@@ -1,6 +0,0 @@
HOST=area51.mifi.dev
PORT=9001
ROUTE_PREFIX=/auth
CONTAINER_PREFIX=mifi

View File

@@ -3,6 +3,9 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
env_file: .env.dev env_file: .env.dev
build:
args:
- CONTAINER_PREFIX=${CONTAINER_PREFIX}
container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo
ports: ports:
- 27017:27017 - 27017:27017
@@ -15,7 +18,13 @@ services:
image: mongo:latest image: mongo:latest
auth-service: auth-service:
env_file: .env.dev env_file: .env.dev
build: . build:
context: .
args:
- HOST=${HOST}
- PORT=${PORT}
- ROUTE_PREFIX=${ROUTE_PREFIX}
- CONTAINER_PREFIX=${CONTAINER_PREFIX}
container_name: ${CONTAINER_PREFIX:-dev}-auth-service container_name: ${CONTAINER_PREFIX:-dev}-auth-service
ports: ports:
- 9001:9001 - 9001:9001

View File

@@ -2,9 +2,8 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service_mongo container_name: ${CONTAINER_PREFIX}-auth-service_mongo
env_file: env_file:
- .env.staging
- staging.env - staging.env
networks: networks:
- docknet - docknet
@@ -14,12 +13,9 @@ services:
image: mongo:latest image: mongo:latest
auth-service: auth-service:
env_file: env_file:
- .env.staging
- staging.env - staging.env
build: . build: .
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service container_name: ${CONTAINER_PREFIX}-auth-service
environment:
- DB_HOST=${CONTAINER_PREFIX:-mifi}-auth-service_mongo
labels: labels:
- 'traefik.enable=true' - 'traefik.enable=true'
- 'traefik.http.routers.grow.rule=Host(`${HOST}`) && Path(`${ROUTE_PREFIX}`)' - 'traefik.http.routers.grow.rule=Host(`${HOST}`) && Path(`${ROUTE_PREFIX}`)'

View File

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