Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker file, docker-compose, and env changes #624

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Dockerfile
theref committed Oct 16, 2023
commit e95425f53e1d80e1ae1297036ec16cf59e44b7e7
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:14-alpine

# Set the working directory inside the container
WORKDIR /app

# Install the dependencies
RUN apk add --update --no-cache python3 make g++ && \
apk update && apk add --no-cache git openssh-client ca-certificates && \
git config --global url."https://".insteadOf git://

ENV PYTHON /usr/bin/python3

# Copy package.json and yarn.lock to the working directory
COPY package*.json yarn.lock ./

# Clean yarn cache and install dependencies
RUN yarn cache clean && yarn install

# Copy the app's source code to the working directory
COPY . .

# Build the React app
ENV NODE_OPTIONS=--max_old_space_size=4096
RUN yarn build

# Expose the container's port
EXPOSE 3000

# Set the command to run when the container starts
CMD ["yarn", "start"]