add a Docker environment for better portability

This commit is contained in:
Andreas Zweili 2021-04-26 10:09:49 +02:00
parent 68f4aa7168
commit 33682677c3
3 changed files with 21 additions and 0 deletions

6
Dockerfile.dev Normal file
View File

@ -0,0 +1,6 @@
FROM node:14
WORKDIR /app
COPY npm-run-serve.sh /usr/bin/npm-run-serve.sh
RUN chmod +x /usr/bin/npm-run-serve.sh
CMD [ "npm-run-serve.sh" ]

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: "3"
services:
frontend:
build:
context: .
dockerfile: ./Dockerfile.dev
ports:
- 8080:8080
volumes:
- ./2021-03-27_routing-01-starting-setup/:/app

4
npm-run-serve.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd /app
npm install
npm run serve