2
0

docker-compose.yml 733 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. version: '2'
  2. services:
  3. db:
  4. environment:
  5. POSTGRES_DB: app_db
  6. POSTGRES_USER: app_user
  7. POSTGRES_PASSWORD: changeme
  8. restart: unless-stopped
  9. image: postgres:14.1
  10. expose:
  11. - '5432'
  12. redis:
  13. restart: unless-stopped
  14. image: redis:6.2
  15. expose:
  16. - '6379'
  17. app:
  18. environment:
  19. DJANGO_SECRET_KEY: changeme
  20. DATABASE_URL: postgres://app_user:changeme@db/app_db
  21. REDIS_URL: redis://redis
  22. DJANGO_SETTINGS_MODULE: bakerydemo.settings.dev
  23. build:
  24. context: .
  25. dockerfile: ./Dockerfile
  26. volumes:
  27. - ./bakerydemo:/code/bakerydemo
  28. links:
  29. - db:db
  30. - redis:redis
  31. ports:
  32. - '8000:8000'
  33. depends_on:
  34. - db
  35. - redis