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 - 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 volumes: postgres_data: