Skip to content

Commit

Permalink
Docker setup to build + run the project
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeboensel committed Dec 27, 2024
1 parent 83e30b2 commit 479cd32
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

.cache

# playwright
test-results

docker/*
17 changes: 17 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:lts
WORKDIR /app

COPY . .

RUN apt-get update && \
apt-get install -y ruby-full && \
gem install bundler && \
bundle install && \
npm install && \
npm run build

ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321

CMD npm start
8 changes: 8 additions & 0 deletions docker/docker_compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
cheatsheet:
image: cheatsheet
build:
context: ..
dockerfile: ./docker/Dockerfile
ports:
- "4321:4321"

0 comments on commit 479cd32

Please sign in to comment.