-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial docker setup Fix docker build error Add changes Fix requested changes Delete compose file
- Loading branch information
1 parent
c42d001
commit 2195b96
Showing
2 changed files
with
39 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,16 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
|
||
|
||
**/.dockerignore | ||
**/.gitignore | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
LICENSE | ||
README.md |
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,23 @@ | ||
# Use the official Node.js image as the base image | ||
FROM node:21-bullseye | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy the entire project | ||
COPY . . | ||
|
||
# Set the yarn version to be that defined as packageManager | ||
RUN yarn set version 4.1.1 | ||
|
||
# Install the dependencies | ||
RUN yarn install --immutable | ||
|
||
# Build the Vite app with the base path | ||
RUN yarn run build | ||
|
||
# Expose the port on which the app will run | ||
EXPOSE 5173 | ||
|
||
# Start the app with dist directory | ||
CMD ["yarn", "preview", "--host", "--port", "5173"] |