Dev Docker container (#35)
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
**/.classpath
|
**/.classpath
|
||||||
**/.dockerignore
|
**/.dockerignore
|
||||||
**/.env
|
|
||||||
**/.git
|
**/.git
|
||||||
**/.gitignore
|
**/.gitignore
|
||||||
**/.project
|
**/.project
|
||||||
|
|||||||
12
Dockerfile.dev
Normal file
12
Dockerfile.dev
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM node:12-alpine as builder
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=builder build /usr/share/nginx/html
|
||||||
|
COPY .env /usr/share/nginx/html/.env
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
@@ -15,7 +15,7 @@ Running locally
|
|||||||
Running Docker container
|
Running Docker container
|
||||||
|
|
||||||
1. Copy .env.template to .env and edit the service urls for authentication and api services
|
1. Copy .env.template to .env and edit the service urls for authentication and api services
|
||||||
2. Build the image `docker build -t fiskerinc/portal .`
|
2. Build the image `docker build -t fiskerinc/portal --file Dockerfile.dev .`
|
||||||
3. Start the container `docker run -p 3000:80 fiskerinc/portal`
|
3. Start the container `docker run -p 3000:80 fiskerinc/portal`
|
||||||
4. Access portal at localhost:3000
|
4. Access portal at localhost:3000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user