Skip to content

Commit

Permalink
adding docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
irvins committed Jul 31, 2024
1 parent 65f132a commit 986bebd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ yarn-error.log
ehthumbs.db
Thumbs.db

# Docker
Dockerfile
docker-compose.yml

# Env files
.env
.env.local
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'
services:
frontend:
build:
context: ./interactive-pathways
dockerfile: Dockerfile
ports:
- "88:80"
backend:
build:
context: ./interactive-pathways-api
dockerfile: Dockerfile
ports:
- "8888:8080"
21 changes: 21 additions & 0 deletions interactive-pathways/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build stage
FROM node:14 as build
WORKDIR /app

# Copy package.json and package-lock.json (if available)
COPY site/package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application
COPY site ./

# Build the app
RUN npm run build

# Production stage
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 986bebd

Please sign in to comment.