add a Docker development setup for Vue

This commit is contained in:
Andreas Zweili 2020-12-07 19:58:09 +01:00
parent 70676c5a90
commit ba1bec3133
3 changed files with 17 additions and 7 deletions

View File

@ -24,10 +24,12 @@ services:
- db
frontend:
build: frontend/.
build:
context: frontend/.
dockerfile: Dockerfile-dev
depends_on:
- backend
ports:
- 80:80
- 3000:3000
volumes:
- ./backend/static:/home/app/backend/static
- ./frontend:/usr/src/app/frontend

View File

@ -1,8 +1,5 @@
version: '3'
volumes:
db_data:
services:
db:
image: postgres
@ -10,7 +7,7 @@ services:
- POSTGRES_DB
- POSTGRES_PASSWORD
volumes:
- db_data:/var/lib/postgresql/data/
- ./db_data:/var/lib/postgresql/data/
backend:
build: backend/.

11
frontend/Dockerfile-dev Normal file
View File

@ -0,0 +1,11 @@
FROM node:latest
WORKDIR /usr/src/app/frontend
COPY package*.json ./
RUN npm install
EXPOSE 3000
CMD ["npm", "run", "dev"]