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

feat: added Docker recipe for building + running the homepage #319

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
out/
Dockerfile
.next/
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Start with NodeJS 20 LTS
FROM node:20 AS build
WORKDIR /usr/app/

# Install dependencies
ARG YARN_TIMEOUT=600000
COPY package.json yarn.lock .
RUN yarn install --network-timeout ${YARN_TIMEOUT}

# Build app from source
COPY . .
RUN yarn build


# Copy built files to NGINX
FROM nginx:alpine AS runtime
RUN rm -rf /usr/share/nginx/html
COPY --from=build /usr/app/out /usr/share/nginx/html

9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:

homepage:
container_name: sdoh-homepage
image: herop/sdoh-homepage
build:
context: .
ports:
- 8080:80