-
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
Showing
3 changed files
with
15 additions
and
8 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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
FROM node:16-alpine as builder | ||
FROM node:16-alpine | ||
|
||
# Set the working directory to /app inside the container | ||
WORKDIR /app | ||
|
||
# Copy app files | ||
COPY . . | ||
|
||
# Install dependencies (npm ci makes sure the exact versions in the lockfile gets installed) | ||
RUN npm install | ||
|
||
# Bundle static assets with nginx | ||
FROM node:16-alpine as production | ||
|
||
# Copy built assets from `builder` image | ||
COPY . . | ||
|
||
# Expose port | ||
EXPOSE 4324 | ||
EXPOSE 4324 | ||
|
||
CMD ["npm", "start"] |
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,10 @@ | ||
version: '3' | ||
|
||
services: | ||
test-app: | ||
container_name: test-apps | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- 4324:4324 |
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