4 Commits

Author SHA1 Message Date
d800311ae7 - ENV updates
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 09:08:15 -04:00
32fdde5d90 - The missing env variables...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 08:43:26 -04:00
2eacdaeece Tweaks
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-06 01:38:00 -04:00
827bce6e1b Updates for staging
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-06 01:15:11 -04:00
7 changed files with 29 additions and 31 deletions

View File

@@ -61,7 +61,7 @@ trigger:
branch: branch:
- main - main
event: event:
- pull_request # - pull_request
- push - push
--- ---
@@ -111,7 +111,7 @@ steps:
- name: Publish Image - name: Publish Image
image: docker image: docker
commands: commands:
- docker build -f docker-compose.staging.yml -t git.mifi.dev/mifi/mifi/auth:latest . - 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
@@ -168,10 +168,10 @@ depends_on:
- Test Pipeline - Test Pipeline
trigger: trigger:
branch: # branch:
- main # - main
event: event:
- push # - push
- tag - tag
--- ---
@@ -193,7 +193,7 @@ steps:
- docker compose -f docker-compose.staging.yml up --wait - docker compose -f docker-compose.staging.yml up --wait
volumes: volumes:
- name: env - name: env
path: /drone/grow/.env path: /drone/grow/staging.env
- name: dockersock - name: dockersock
path: /var/run/docker.sock path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
@@ -230,8 +230,8 @@ depends_on:
- Test Pipeline - Test Pipeline
trigger: trigger:
branch: # branch:
- main # - main
event: event:
- push # - push
- tag - tag

View File

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

6
.env.staging Normal file
View File

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

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 FROM node:20-alpine AS build
WORKDIR /home/node/app WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./

View File

@@ -2,7 +2,7 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
env_file: dev.env env_file: .env.dev
container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo container_name: ${CONTAINER_PREFIX:-dev}-auth-service_mongo
ports: ports:
- 27017:27017 - 27017:27017
@@ -14,7 +14,7 @@ services:
restart: unless-stopped restart: unless-stopped
image: mongo:latest image: mongo:latest
auth-service: auth-service:
env_file: dev.env env_file: .env.dev
build: . build: .
container_name: ${CONTAINER_PREFIX:-dev}-auth-service container_name: ${CONTAINER_PREFIX:-dev}-auth-service
ports: ports:

View File

@@ -2,20 +2,24 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
container_name: ${CONTAINER_PREFIX}-auth-service_mongo container_name: ${CONTAINER_PREFIX:-mifi}-auth-service_mongo
env_file: .env env_file:
- .env.staging
- staging.env
networks: networks:
- docknet - docknet
volumes: volumes:
- '/volume1/docker/labs/auth/mongo:/data/db' - '/volume1/docker/labs/auth/mongo:/data/db'
restart: unless-stopped restart: unless-stopped
image: mongo image: mongo:latest
auth-service: auth-service:
env_file: .env env_file:
- .env.staging
- staging.env
build: . build: .
container_name: ${CONTAINER_PREFIX}-auth-service container_name: ${CONTAINER_PREFIX:-mifi}-auth-service
environment: environment:
- DB_HOST=${CONTAINER_PREFIX}-auth-service_mongo - 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}`)'
@@ -27,7 +31,7 @@ services:
networks: networks:
- docknet - docknet
restart: unless-stopped restart: unless-stopped
image: node image: node:20-alpine
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.26", "version": "0.0.30",
"author": "mifi (Mike Fitzpatrick)", "author": "mifi (Mike Fitzpatrick)",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {