-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile & set IP:PORT config for listen
- Loading branch information
1 parent
5ce58a9
commit 818e5b6
Showing
3 changed files
with
37 additions
and
1 deletion.
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,2 @@ | ||
PORT=4200 | ||
HOST='0.0.0.0' |
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
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,34 @@ | ||
ARG BASE_IMAGE=node:18-alpine3.18 | ||
|
||
# This is a multiple stage Dockerfile. | ||
|
||
# - Stage 1: builder (adds dependencies, environment variables, and builds the project using yarn) | ||
|
||
# - Stage 2: runner (final image for the web project, sets environment variables, starts the server) | ||
|
||
################################################################################ | ||
|
||
# Stage: builder | ||
FROM ${BASE_IMAGE} AS builder | ||
|
||
|
||
### First install the dependencies (as they change less often) | ||
COPY . /app | ||
|
||
WORKDIR /app | ||
## Setting up the environment variables for the docker container. | ||
|
||
RUN yarn install | ||
#--inline-builds | ||
|
||
## Build the project | ||
RUN yarn build | ||
|
||
################################################################################ | ||
|
||
# Stage: runner | ||
FROM builder AS runner | ||
|
||
WORKDIR /app | ||
|
||
CMD yarn preview |