Commit 724674d2 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

use only one docker compose

parent 3e3005c0
......@@ -34,7 +34,7 @@ You can of course customize more of the Django server settings in the `settings`
For the moment, only the `docker-compose.dev.yaml` is used. To run the application simply run the command:
```bash
docker-compose -f docker-compose.dev.yaml up --build
docker-compose up --build
```
The `--build` option is only necessary during the first usage or when you make changes that need the docker
......
version: '3.7'
services:
backend:
container_name: backend
build:
context: ./backend
volumes:
- ./backend:/code
- django-static:/backend/public/static
ports:
- "8000:8000"
env_file: .env
environment:
DEBUG: "true"
depends_on:
- db
command: /code/scripts/start.sh
networks:
- main
db:
container_name: db
image: postgres:latest
ports:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
networks:
- main
frontend:
build:
context: ./frontend
volumes:
- ./frontend:/app
- '/app/node_modules'
ports:
- "8080:8080"
networks:
- main
depends_on:
- backend
- db
environment:
- NODE_ENV=development
nginx:
build:
context: .
dockerfile: nginx/dev/Dockerfile
ports:
- "80:80"
depends_on:
- backend
volumes:
- ./nginx/dev/dev.conf:/etc/nginx/nginx.conf:ro
- django-static:/usr/src/app/static
networks:
- main
volumes:
db-data:
django-static:
networks:
main:
driver: bridge
......@@ -3,9 +3,11 @@ version: '3.7'
services:
backend:
container_name: backend
build: ./backend
build:
context: ./backend
volumes:
- ./backend:/code
- django-static:/backend/public/static
ports:
- "8000:8000"
env_file: .env
......@@ -14,6 +16,8 @@ services:
depends_on:
- db
command: /code/scripts/start.sh
networks:
- main
db:
container_name: db
......@@ -22,6 +26,44 @@ services:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
networks:
- main
frontend:
build:
context: ./frontend
volumes:
- ./frontend:/app
- '/app/node_modules'
ports:
- "8080:8080"
networks:
- main
depends_on:
- backend
- db
environment:
- NODE_ENV=development
nginx:
build:
context: .
dockerfile: nginx/dev/Dockerfile
ports:
- "80:80"
depends_on:
- backend
volumes:
- ./nginx/dev/dev.conf:/etc/nginx/nginx.conf:ro
- django-static:/usr/src/app/static
networks:
- main
volumes:
db-data:
django-static:
networks:
main:
driver: bridge
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