Commit 4b779ced authored by Laura Morel's avatar Laura Morel
Browse files

Fix docker containers

parent 9476c78a
FROM node:14.13.1 # Stage 1: build
FROM node:14.13.1 as build
WORKDIR /app WORKDIR /app
COPY package.json /app COPY package.json /app
RUN npm install RUN npm install
COPY . /app/ COPY . /app/
RUN npm run build RUN npm run build
# Stage 2: serve
FROM nginx:1.17.1
RUN rm -rf /usr/shar/nginx/html/*
COPY --from=build /app/dist/VizFaDa /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
server { server {
listen 80; listen 4200;
gzip on; gzip on;
......
...@@ -13,3 +13,5 @@ COPY . /code/ ...@@ -13,3 +13,5 @@ COPY . /code/
RUN python3.8 manage.py makemigrations RUN python3.8 manage.py makemigrations
RUN python3.8 manage.py migrate --run-syncdb && python manage.py fill_db True RUN python3.8 manage.py migrate --run-syncdb && python manage.py fill_db True
EXPOSE 8000
...@@ -4,7 +4,7 @@ services: ...@@ -4,7 +4,7 @@ services:
dj: dj:
container_name: dj container_name: dj
build: Django build: Django
command: python3.8 manage.py runserver command: python3.8 manage.py runserver 0.0.0.0:8000
volumes: volumes:
- ./Django:/code - ./Django:/code
- /tmp/.X11-unix:/tmp/.X11-unix - /tmp/.X11-unix:/tmp/.X11-unix
...@@ -15,6 +15,5 @@ services: ...@@ -15,6 +15,5 @@ services:
ng: ng:
container_name: ng container_name: ng
build: Angular build: Angular
command: ng serve
ports: ports:
- "8080:4200" - "8080:4200"
Markdown is supported
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