Compare commits
26 Commits
0.0.31
...
01a5ff907c
| Author | SHA1 | Date | |
|---|---|---|---|
|
01a5ff907c
|
|||
|
e22e3d8bc3
|
|||
|
efecd78355
|
|||
|
ed4246ba0e
|
|||
|
4acc228fe3
|
|||
|
42279b0592
|
|||
|
e417ab64d8
|
|||
|
93b11c3a35
|
|||
|
1ef2c4919e
|
|||
|
6ff8f74317
|
|||
|
bf70ca98f3
|
|||
|
52e5befd93
|
|||
|
a047b49073
|
|||
|
59b20578bb
|
|||
|
cdd6c6a72a
|
|||
|
1d16473d2d
|
|||
|
cd2bef9811
|
|||
|
62118b6d64
|
|||
|
8290b332fb
|
|||
|
61236719f4
|
|||
|
aa699d5009
|
|||
|
9a4f9cdf4c
|
|||
|
5532fc51a9
|
|||
|
99db648a36
|
|||
|
adcab6afcb
|
|||
|
8e40c0a06c
|
185
.drone.yml
185
.drone.yml
@@ -1,74 +1,73 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Test Pipeline
|
||||
# kind: pipeline
|
||||
# type: docker
|
||||
# name: Test Pipeline
|
||||
|
||||
workspace:
|
||||
path: /drone/grow
|
||||
# workspace:
|
||||
# path: /drone/grow
|
||||
|
||||
steps:
|
||||
- name: yarn install
|
||||
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 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
|
||||
# steps:
|
||||
# - name: yarn install
|
||||
# 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 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
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
# - pull_request
|
||||
- push
|
||||
# trigger:
|
||||
# branch:
|
||||
# - main
|
||||
# event:
|
||||
# # - pull_request
|
||||
# - push
|
||||
|
||||
---
|
||||
# ---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Publish Pipeline
|
||||
group: publish
|
||||
|
||||
workspace:
|
||||
path: /drone/grow
|
||||
@@ -110,33 +109,20 @@ steps:
|
||||
- failure
|
||||
- name: Publish Image
|
||||
image: docker
|
||||
environemnt:
|
||||
USERNAME:
|
||||
from_secret: registry_username
|
||||
PASSWORD:
|
||||
from_secret: registry_password
|
||||
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
|
||||
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
|
||||
- name: Report Image Publish Status
|
||||
image: plugins/webhook
|
||||
settings:
|
||||
@@ -164,15 +150,15 @@ volumes:
|
||||
host:
|
||||
path: /volume1/docker/beethoven/labs-auth/.npmrc
|
||||
|
||||
depends_on:
|
||||
- Test Pipeline
|
||||
# depends_on:
|
||||
# - Test Pipeline
|
||||
|
||||
trigger:
|
||||
# branch:
|
||||
# - main
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
# - push
|
||||
- tag
|
||||
- push
|
||||
# - tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -186,6 +172,11 @@ 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
|
||||
@@ -224,14 +215,14 @@ volumes:
|
||||
path: /var/run/docker.sock
|
||||
- name: env-secrets
|
||||
host:
|
||||
path: /volume1/docker/beethoven/labs-auth/staging.secrets.env
|
||||
path: /volume1/docker/beethoven/labs-auth/staging.env
|
||||
|
||||
depends_on:
|
||||
- Test Pipeline
|
||||
# depends_on:
|
||||
# - Test Pipeline
|
||||
|
||||
trigger:
|
||||
# branch:
|
||||
# - main
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
# - push
|
||||
- tag
|
||||
- push
|
||||
# - tag
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
HOST=area51.mifi.dev
|
||||
PORT=9001
|
||||
|
||||
ROUTE_PREFIX=/auth
|
||||
|
||||
CONTAINER_PREFIX=mifi
|
||||
@@ -3,6 +3,9 @@ version: '3.8'
|
||||
services:
|
||||
auth-service_mongo:
|
||||
env_file: .env.dev
|
||||
build:
|
||||
args:
|
||||
- CONTAINER_PREFIX=${CONTAINER_PREFIX}
|
||||
container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo
|
||||
ports:
|
||||
- 27017:27017
|
||||
@@ -15,7 +18,13 @@ services:
|
||||
image: mongo:latest
|
||||
auth-service:
|
||||
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
|
||||
ports:
|
||||
- 9001:9001
|
||||
|
||||
@@ -2,9 +2,8 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
auth-service_mongo:
|
||||
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service_mongo
|
||||
container_name: ${CONTAINER_PREFIX}-auth-service_mongo
|
||||
env_file:
|
||||
- .env.staging
|
||||
- staging.env
|
||||
networks:
|
||||
- docknet
|
||||
@@ -14,12 +13,9 @@ services:
|
||||
image: mongo:latest
|
||||
auth-service:
|
||||
env_file:
|
||||
- .env.staging
|
||||
- staging.env
|
||||
build: .
|
||||
container_name: ${CONTAINER_PREFIX:-mifi}-auth-service
|
||||
environment:
|
||||
- DB_HOST=${CONTAINER_PREFIX:-mifi}-auth-service_mongo
|
||||
container_name: ${CONTAINER_PREFIX}-auth-service
|
||||
labels:
|
||||
- 'traefik.enable=true'
|
||||
- 'traefik.http.routers.grow.rule=Host(`${HOST}`) && Path(`${ROUTE_PREFIX}`)'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mifi/auth",
|
||||
"version": "0.0.31",
|
||||
"version": "0.0.34",
|
||||
"author": "mifi (Mike Fitzpatrick)",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user