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

branch merge #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
npm-debug.log
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [


{
"type": "node",
"request": "attach",
"name": "Docker: Attach to Node",
"remoteRoot": "/usr/src/app"
},


]
}
Binary file added CS470_Final_Reflection.docx
Binary file not shown.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# using Node v10
FROM node:10
ENV NODE_ENV production

# Create app directory
WORKDIR /usr/src/lafs



# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)

COPY package*.json ./app/package.json
# RUN npm install --production --silent && mv node_modules ../

RUN npm install -g @angular/cli@v6-lts
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

# Expose port 3000 outside container
EXPOSE 8080
# Command used to start application
CMD [ "node", "server.js" ]
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.7'
services:
# REST API running on Node JS container
app:
container_name: lafs-api
restart: always
build: .
ports:
- '3000:3000'
# link this container to the Mongo DB container
links:
- mongo
# pass in environment variables for database host and name
environment:
- DB_HOST=mongo
- DB_NAME=lafs-db
# Mongo DB storage container
mongo:
container_name: lafs-db
image: 'mongo:4'
ports:
- '27017:27017'
# Attach the external network to these containers
networks:
default:
name: lafs-net
external: true
Loading