Skip to content

Commit

Permalink
Merge pull request #37 from OCR-D/dockerize
Browse files Browse the repository at this point in the history
Dockerize
  • Loading branch information
mweidling committed Jun 28, 2023
2 parents 2d5344a + 92a99f8 commit 80e78e8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:lts-alpine as build-stage

# make the 'app' folder the current working directory
WORKDIR /app

# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

# install project dependencies
RUN npm install

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
RUN npm run build

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist/assets /usr/share/nginx/html/quiver-frontend/assets
COPY --from=build-stage /app/dist/index.html /usr/share/nginx/html/index.html
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ npm run build
```sh
npm run lint
```

## Project Setup with Docker

Build the Docker image:

```sh
docker build -t qfa .
```

Run a container based on this image:

```sh
docker run --rm -d --name qfa-server -p 8083:80 qfa
```

0 comments on commit 80e78e8

Please sign in to comment.