6 Commits

Author SHA1 Message Date
bc96664b7c Path fixes ... and the dumbest environment error yet...
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-05 10:53:42 -04:00
04ec6e2de3 Hmmmm
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 10:42:22 -04:00
ba31f4b8be More changes
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 10:01:42 -04:00
d5f9bc4d05 fix bad commands
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 09:20:14 -04:00
ad9ffc89b5 With links and fixed names...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 09:09:06 -04:00
f482750d08 this may break everything...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-05 08:47:54 -04:00
5 changed files with 39 additions and 12 deletions

View File

@@ -179,7 +179,7 @@ steps:
commands: commands:
- docker compose pull - docker compose pull
- docker compose build --no-cache - docker compose build --no-cache
- docker compose down - docker compose rm --stop
- docker compose up --wait - docker compose up --wait
volumes: volumes:
- name: env - name: env
@@ -214,7 +214,7 @@ volumes:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: env - name: env
host: host:
path: /volume1/docker/labs/grow-auth/.env path: /volume1/docker/beethoven/labs-auth/staging.env
depends_on: depends_on:
- Test Pipeline - Test Pipeline

View File

@@ -23,5 +23,4 @@ WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./
RUN yarn install --frozen-lockfile --production RUN yarn install --frozen-lockfile --production
COPY --from=0 /home/node/app/dist . COPY --from=0 /home/node/app/dist .
EXPOSE 80
CMD ["node","server/index.js"] CMD ["node","server/index.js"]

25
dev.env Normal file
View File

@@ -0,0 +1,25 @@
HOST=grow.mifi.dev
PORT=9001
ROUTE_PREFIX=/auth
LOGIN_ROUTE=/login
RESET_ROUTE=/reset
DB_USERNAME=user
DB_PASSWORD=password
DB_NAME=auth
SESSION_KEY=shjhakjfhfjdshjksdhfdshfhfduyeyb73te4
JWT_AUDIENCE=Grow.io
JWT_ISSUER=Grow Latch
JWT_SECRET='Th!sIs a d3v3lopm3nt server $#cr¢T.'
LOGIN_VALID_TIME=12H
RESET_VALID_MINUTES=15
DEFAULT_TOKEN_DAYS=1
CONTAINER_PREFIX=grow
SERVICE_NAME=auth-service
DB_TYPE=mongo

View File

@@ -3,18 +3,20 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE} container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
env_file: .env
environment: environment:
- ALLOW_EMPTY_PASSWORD=yes - ALLOW_EMPTY_PASSWORD=yes
- MONGO_INITDB_ROOT_USERNAME=${DB_USER} - MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASS} - MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD}
- MONGO_INITDB_DATABASE=${DB_NAME} - MONGO_INITDB_DATABASE=${DB_NAME}
networks: networks:
- docknet - docknet
volumes: volumes:
- '/volume1/docker/labs/grow-auth/mongo:/data/db' - '/volume1/docker/labs/auth/mongo:/data/db'
restart: unless-stopped restart: unless-stopped
image: mongo image: mongo
auth-service: auth-service:
env_file: .env
build: . build: .
container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME} container_name: ${CONTAINER_PREFIX}-${SERVICE_NAME}
environment: environment:
@@ -22,9 +24,9 @@ services:
- ROUTE_PREFIX=${ROUTE_PREFIX} - ROUTE_PREFIX=${ROUTE_PREFIX}
- LOGIN_ROUTE=${LOGIN_ROUTE} - LOGIN_ROUTE=${LOGIN_ROUTE}
- RESET_ROUTE=${RESET_ROUTE} - RESET_ROUTE=${RESET_ROUTE}
- DB_HOST=${SERVICE_NAME}_${DB_TYPE} - DB_HOST=${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
- DB_USER=${DB_USER} - DB_USER=${DB_USERNAME}
- DB_PASS=${DB_PASS} - DB_PASS=${DB_PASSWORD}
- DB_NAME=${DB_NAME} - DB_NAME=${DB_NAME}
- SESSION_KEY=${SESSION_KEY} - SESSION_KEY=${SESSION_KEY}
- JWT_AUDIENCE=${JWT_AUDIENCE} - JWT_AUDIENCE=${JWT_AUDIENCE}
@@ -35,8 +37,7 @@ services:
- DEFAULT_TOKEN_DAYS=${DEFAULT_TOKEN_DAYS} - DEFAULT_TOKEN_DAYS=${DEFAULT_TOKEN_DAYS}
labels: labels:
- 'traefik.enable=true' - 'traefik.enable=true'
- 'traefik.http.routers.grow.rule=Host(`${HOST}`)' - 'traefik.http.routers.grow.rule=Host(`${HOST}`) && Path(`${ROUTE_PREFIX}`)'
- 'traefik.http.routers.grow.rule=Path(`${ROUTE_PREFIX}`)'
- 'traefik.http.routers.grow.entrypoints=websecure' - 'traefik.http.routers.grow.entrypoints=websecure'
- 'traefik.http.routers.grow.tls=true' - 'traefik.http.routers.grow.tls=true'
- 'traefik.http.routers.grow.tls.certresolver=letsencrypt' - 'traefik.http.routers.grow.tls.certresolver=letsencrypt'
@@ -46,6 +47,8 @@ services:
- docknet - docknet
restart: unless-stopped restart: unless-stopped
image: node image: node
links:
- auth-service_mongo:${CONTAINER_PREFIX}-${SERVICE_NAME}_${DB_TYPE}
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.13", "version": "0.0.19",
"author": "mifi (Mike Fitzpatrick)", "author": "mifi (Mike Fitzpatrick)",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {