Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authentication and entities #6

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
database
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### DEV ###
FROM node:16-alpine
# Safer workdir
WORKDIR /usr/src/app
# Copy package.json and package-lock.json
COPY ./package*.json ./

RUN npm install
# Copy source code
COPY . .
55 changes: 55 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: '3.9'
services:
dev:
container_name: uni_verse_api_dev
build:
context: .
dockerfile: ./Dockerfile
command: npm run start:dev
ports:
- 3000:3000
- 3001:9229
depends_on:
- mongodb
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: unless-stopped
environment:
MONGO_HOSNAME: mongodb
MONGO_USER: root
MONGO_PASSWORD: pass
MONGO_PORT: 27017

mongodb:
image : mongo:latest
container_name: mongodb
restart: always
volumes:
- mongodb-data:/data/db
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: pass
MONGO_INITDB_DATABASE: db

mongo-express:
image: mongo-express
container_name: server-mongo-express
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: pass
ME_CONFIG_BASICAUTH_USERNAME: root
ME_CONFIG_BASICAUTH_PASSWORD: pass
volumes:
- mongodb-data
depends_on:
- mongodb
ports:
- "8081:8081"
restart: always
volumes:
mongodb-data:
name: mongodb-data
Loading