docker-compose.yml 1.21 KB
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
2
3
4
5
6
7
8
9
10
11
12
13
version: '3.7'

services:
  backend:
    image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend:latest
    # build: ./backend
    volumes:
      - .:/usr/src/app/
    ports:
      - 8000:8000  # Replicate the python server port
    environment:
      - ENV=DEV
      - SECRET_KEY=please_change_me
14
15
      - DJANGO_ADMIN_USERNAME=admin
      - DJANGO_ADMIN_PASSWORD=admin
Florent Chehab's avatar
Florent Chehab committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
      - DB_HOST=database
      - DB_PORT=5432
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    command: /bin/sh -c "cd backend && ./manage.py runserver 0.0.0.0:8000"
    depends_on:
      - database
  database:
    image: postgres:10.5-alpine
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    volumes:
      - postgres_data:/var/lib/postgresql/data/
  frontend:
    build: ./frontend
    command: /bin/sh -c "cd frontend && npm i --verbose && npm run dev"
    volumes:
      - .:/usr/src/app/
    ports:
      - 3000:3000  # Replicate the node server port
39
40
41
42
43
44
45
  documentation:
    build: ./documentation
    volumes:
      - ./documentation:/usr/src/app
    command: /bin/sh -c "python -m http.server 5000"
    ports:
      - "5000:5000"
Florent Chehab's avatar
Florent Chehab committed
46
47
volumes:
  postgres_data: