Working setups for dev and staging! (mostly)
All checks were successful
continuous-integration/drone/push Build is passing

TODO: Still no access to routes on staging... hmmm...
This commit is contained in:
2023-05-12 15:37:32 -04:00
parent 17949255d3
commit d9285e4bec
4 changed files with 3 additions and 16 deletions

View File

@@ -11,7 +11,6 @@ services:
volumes: volumes:
- auth-db:/data/db - auth-db:/data/db
- auth-db:/data/configdb - auth-db:/data/configdb
# - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
restart: unless-stopped restart: unless-stopped
image: mongo:latest image: mongo:latest
auth-service: auth-service:

View File

@@ -2,7 +2,7 @@ version: '3.8'
services: services:
auth-service_mongo: auth-service_mongo:
container_name: ${CONTAINER_PREFIX:-staging}-auth-service_mongodb container_name: ${CONTAINER_PREFIX:-staging}-auth-service_mongo
env_file: env_file:
- staging.env - staging.env
build: build:
@@ -28,7 +28,7 @@ services:
- PORT - PORT
- ENV - ENV
environment: environment:
- DB_HOST=${CONTAINER_PREFIX:-staging}-auth-service_mongodb - DB_HOST=${CONTAINER_PREFIX:-staging}-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

@@ -9,8 +9,7 @@ import passport from '../passport';
import { ErrorCodes, getErrorBody } from '../../constants/errors'; import { ErrorCodes, getErrorBody } from '../../constants/errors';
import { authenticated } from '../middleware/authenication'; import { authenticated } from '../middleware/authenication';
// const routerOpts: Router.IRouterOptions = { prefix }; const routerOpts: Router.IRouterOptions = { prefix };
const routerOpts: Router.IRouterOptions = {};
const router: Router = new Router(routerOpts); const router: Router = new Router(routerOpts);
router.get('/info', (ctx) => { router.get('/info', (ctx) => {

View File

@@ -1,11 +0,0 @@
/* eslint-disable no-undef */
db.createUser({
user: process.env.DB_USERNAME,
pwd: process.env.DB_PASSWORD,
roles: [
{
role: 'readWrite',
db: process.env.DB_NAME,
},
],
});