Skip to content

Commit

Permalink
Docker configuration setup
Browse files Browse the repository at this point in the history
Initial docker setup

Fix docker build error

Add changes

Fix requested changes

Delete compose file
  • Loading branch information
VickTor61 authored and mrdjohnson committed May 8, 2024
1 parent c42d001 commit 2195b96
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
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
23 changes: 23 additions & 0 deletions Dockerfile
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"]

0 comments on commit 2195b96

Please sign in to comment.