26 Commits

Author SHA1 Message Date
c80856f3c5 Adding the build back...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 13:16:03 -04:00
70737658c7 Hmmm..,.
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 13:14:09 -04:00
ebf0c6d970 Some crazy shit right here... mongo in the Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 13:09:30 -04:00
c92cefa903 This should work, but is suboptimal
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 12:40:16 -04:00
63e4270c89 La la la
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 12:33:16 -04:00
721edb71a1 - Build the db?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 12:18:48 -04:00
8f20452e1a Sigh...
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 11:47:08 -04:00
de58630958 Ha.
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-10 11:42:39 -04:00
f61b2b4535 Temp folder?
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-10 11:41:13 -04:00
6863d64112 Changes..
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 11:30:15 -04:00
aa52473f90 Ugh
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 11:15:43 -04:00
465e47fc10 Symlinks?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 11:03:57 -04:00
3a721987dd This absolutely won't work...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 10:47:29 -04:00
2792753d3d Change volume inclusion back
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 10:34:47 -04:00
af6184d581 More tweaks
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 10:13:23 -04:00
40a3cdabc9 trying again... same ol mongo-init
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 10:04:09 -04:00
08e6af2eae - Trying to fix the mongo init
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-10 10:01:17 -04:00
09332aca24 fixed clone issue
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-10 09:54:33 -04:00
b161f926a9 Merge pull request 'Resolve branch name issue in pipeline trigger' (#8) from bugfix/pipeline-boken into develop
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #8
2023-05-10 13:50:40 +00:00
c406d6226c Resolve branch name issue in pipeline trigger
All checks were successful
continuous-integration/drone/pr Build is passing
2023-05-10 09:45:01 -04:00
74fd2bf32c Merge pull request 'Working Local Dev' (#7) from feature/working-local-dev into develop
Reviewed-on: #7
2023-05-10 13:40:42 +00:00
377300d288 Merge branch 'feature/working-local-dev' of ssh://git.mifi.dev:12022/mifi/auth into feature/working-local-dev
All checks were successful
continuous-integration/drone/pr Build is passing
2023-05-10 09:36:56 -04:00
83cc9be24c Drone pipeline fixes 2023-05-10 09:36:33 -04:00
4eaf354912 Merge branch 'develop' into feature/working-local-dev 2023-05-10 13:35:17 +00:00
c9a8e0746a Last second changes 2023-05-10 09:33:45 -04:00
cd980f2af9 Merge pull request 'feature/deploy-from-image-2' (#4) from feature/deploy-from-image-2 into main
Reviewed-on: #4
2023-05-10 00:48:40 +00:00
5 changed files with 87 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ type: docker
name: Test Pipeline name: Test Pipeline
workspace: workspace:
path: /drone/grow path: /drone/auth
steps: steps:
- name: yarn install - name: yarn install
@@ -70,7 +70,7 @@ type: docker
name: Publish Pipeline name: Publish Pipeline
workspace: workspace:
path: /drone/grow path: /drone/auth
steps: steps:
- name: Build Package - name: Build Package
@@ -85,7 +85,7 @@ steps:
- yarn publish -t ${DRONE_TAG} - yarn publish -t ${DRONE_TAG}
volumes: volumes:
- name: npmrc - name: npmrc
path: /drone/grow/.npmrc path: /drone/auth/.npmrc
- name: Report NPM Publish Status - name: Report NPM Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
@@ -151,10 +151,74 @@ trigger:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: Deploy Pipeline name: Staging Deploy Pipeline
workspace: workspace:
path: /drone/grow path: /drone/auth
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-build.yml build --pull --no-cache
- docker compose -f docker-compose.staging-build.yml up --remove-orphans --pull always --build --force-recreate --wait
volumes:
- name: env-secrets
path: /drone/auth/staging.env
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /drone/auth/.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-secrets
host:
path: /volume1/docker/beethoven/labs-auth/staging.env
depends_on:
- Test Pipeline
trigger:
branch:
- develop
event:
- push
---
kind: pipeline
type: docker
name: Production Deploy Pipeline
workspace:
path: /drone/auth
clone: clone:
disable: true disable: true
@@ -169,17 +233,17 @@ steps:
ROUTE_PREFIX: /auth ROUTE_PREFIX: /auth
PORT: 9001 PORT: 9001
commands: commands:
- docker compose -f docker-compose.staging-image.yml pull - docker compose -f docker-compose.production-build.yml pull
- docker compose -f docker-compose.staging-image.yml build --no-cache - docker compose -f docker-compose.production-build.yml build --no-cache
- docker compose -f docker-compose.staging-image.yml rm --stop - docker compose -f docker-compose.production-build.yml rm --stop
- docker compose -f docker-compose.staging-image.yml up --wait - docker compose -f docker-compose.production-build.yml up --wait
volumes: volumes:
- name: env-secrets - name: env-secrets
path: /drone/grow/staging.env path: /drone/auth/production.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/auth/.docker/config.json
- name: Send Status Notifications - name: Send Status Notifications
image: plugins/webhook image: plugins/webhook
privileged: true privileged: true

View File

@@ -1,3 +1,8 @@
FROM mongo:latest AS auth-service_mongo
ENV NODE_ENV development
WORKDIR /docker-entrypoint-initdb.d
COPY mongo-init.js ./
FROM node:20-alpine AS build FROM node:20-alpine AS build
ENV NODE_ENV development ENV NODE_ENV development
WORKDIR /home/node/app WORKDIR /home/node/app
@@ -9,7 +14,7 @@ RUN yarn install
RUN yarn build RUN yarn build
## this is stage two , where the app actually runs ## this is stage two , where the app actually runs
FROM node:20-alpine AS containerize FROM node:20-alpine AS auth-service
ENV NODE_ENV ${ENV:-production} ENV NODE_ENV ${ENV:-production}
WORKDIR /home/node/app WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./

View File

@@ -1,2 +1,2 @@
# grow-api # @mifi/auth

View File

@@ -9,7 +9,8 @@ services:
networks: networks:
- backend - backend
volumes: volumes:
- auth-db:/data - auth-db:/data/db
- auth-db:/data/configdb
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
restart: unless-stopped restart: unless-stopped
image: mongo:latest image: mongo:latest

View File

@@ -5,11 +5,12 @@ services:
container_name: ${CONTAINER_PREFIX:-staging}-auth-service_mongo container_name: ${CONTAINER_PREFIX:-staging}-auth-service_mongo
env_file: env_file:
- staging.env - staging.env
build: .
networks: networks:
- docknet - docknet
volumes: volumes:
- 'auth-db:/data' - 'auth-db:/data/db'
- './mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro' - 'auth-db:/data/configdb'
restart: unless-stopped restart: unless-stopped
image: mongo:latest image: mongo:latest
auth-service: auth-service: