Commit 1fb805c5 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

add docker-compose dev and Dockerfile for front

parent ea82f7ec
Pipeline #12669 passed with stage
in 1 minute and 1 second
version: '3.7'
services:
backend:
container_name: backend
build: ./backend
volumes:
- ./backend:/code
ports:
- "8000:8000"
env_file: .env
environment:
DEBUG: "true"
depends_on:
- db
command: /code/scripts/start.sh
db:
container_name: db
image: postgres:latest
ports:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
frontend:
build:
context: ./frontend
volumes:
- ./frontend:/app/frontend:ro
- '/app/node_modules'
ports:
- "8080:8080"
networks:
- main
depends_on:
- backend
- db
environment:
- NODE_ENV=development
volumes:
db-data:
networks:
main:
driver: bridge
FROM node:10.16.0-alpine
# make the 'app' folder the current working directory
WORKDIR /app/
# copy package.json to the /app/ folder
COPY package.json ./
# https://docs.npmjs.com/cli/cache
RUN npm cache verify
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# expose port 8080 to the host
EXPOSE 8080
# run the development server
CMD ["npm", "run", "serve"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment