mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-08-29 10:43:56 +00:00
Added Docker Support
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
# Stage 1: Build the NextJS Application
|
||||
FROM node:20-alpine as build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Setup the Nginx Server to serve the NextJS Application
|
||||
FROM nginx:stable-alpine3.17 as production
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
@@ -36,5 +36,12 @@ npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Docker Build
|
||||
```bash
|
||||
docker build -t drawdb .
|
||||
docker run -p 3000:80 drawdb
|
||||
```
|
||||
|
||||
|
||||
Set up the [server](https://github.com/drawdb-io/drawdb-server) and environment variables according to `.env.sample` for the survey and bug report forms.
|
||||
|
||||
|
Reference in New Issue
Block a user