docker-compose.yml 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. version: '3'
  2. services:
  3. personalsite-db:
  4. image: postgres:alpine
  5. container_name: personalsite-db
  6. ports:
  7. - 5432:5432
  8. restart: always
  9. volumes:
  10. - personalsite_db:/var/lib/postgresql/data
  11. environment:
  12. - POSTGRES_USER=postgres
  13. - POSTGRES_PASSWORD=postgres
  14. - POSTGRES_DB=personalsite
  15. networks:
  16. teanet:
  17. ipv4_address: 172.23.0.5
  18. app:
  19. image: rusian/personalsite
  20. container_name: personalsite
  21. env_file: config.env
  22. ports:
  23. - "7012:80"
  24. tty: true
  25. restart: "always"
  26. depends_on:
  27. - personalsite-db
  28. volumes:
  29. - personalsite_app:/srv/app/static
  30. - personalsite_app:/srv/app/media
  31. networks:
  32. teanet:
  33. ipv4_address: 172.23.0.6
  34. volumes:
  35. personalsite_db:
  36. personalsite_app:
  37. networks:
  38. teanet:
  39. driver: bridge
  40. ipam:
  41. config:
  42. - subnet: 172.23.0.0/16