-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
640e08d
commit 05206b6
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.github/ | ||
.ssh/ | ||
.vscode/ | ||
coverage/ | ||
node_modules/ | ||
tests/ | ||
!tests/.htpasswd | ||
.env | ||
.eslintrc.js | ||
.git/ | ||
.gitignore | ||
.prettier* | ||
jest* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#Docker instructions necessary for Docker Engine to build the image | ||
FROM node:18.17.0 | ||
|
||
LABEL maintainer="Maria Dmytrenko" | ||
LABEL description="Fragments node.js microservice" | ||
|
||
# We default to use port 8080 in our service | ||
ENV PORT=8080 | ||
|
||
# Reduce npm spam when installing within Docker | ||
# https://docs.npmjs.com/cli/v8/using-npm/config#loglevel | ||
ENV NPM_CONFIG_LOGLEVEL=warn | ||
|
||
# Disable colour when run inside Docker | ||
# https://docs.npmjs.com/cli/v8/using-npm/config#color | ||
ENV NPM_CONFIG_COLOR=false | ||
|
||
# Use /app as our working directory | ||
WORKDIR /app | ||
|
||
# Copies the package.json and package-lock.json files into the working dir (./app) | ||
COPY package.json package-lock.json ./ | ||
|
||
# Install node dependencies defined in package-lock.json | ||
RUN npm install | ||
|
||
# Copy src to /app/src/ | ||
COPY ./src ./src | ||
|
||
# Copy our HTPASSWD file | ||
COPY ./tests/.htpasswd ./tests/.htpasswd | ||
|
||
# Start the container by running our server | ||
CMD npm start | ||
|
||
# Run service on port 8080 | ||
EXPOSE 8080 |