version: "3.4" services: web: build: . command: ./manage.py runserver 0.0.0.0:8000 ports: - "8000:8000" environment: - "DJANGO_SETTINGS_MODULE=modernomad.settings.local" - "DATABASE_URL=postgres://postgres@postgres/postgres" # Read these envvars from .env or environment Compose is run in - "STRIPE_SECRET_KEY" - "STRIPE_PUBLISHABLE_KEY" - "MAILGUN_API_KEY" links: - postgres volumes: - "./:/app" client: build: . working_dir: /app/client/ command: sh -c "npm install && node server.js" ports: - "3000:3000" # Bind mount app directory, but leave node_modules intact volumes: - "./:/app" - "/app/client/node_modules" postgres: image: postgres:10