services: postgresql: image: postgres:16 container_name: ${PROJECT_NAME}-postgresql restart: ${RESTART_POLICY} env_file: .env environment: POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_DB: ${DB_NAME} expose: - 5432 django: build: context: ./ dockerfile: ./Dockerfiles/django/Dockerfile container_name: ${PROJECT_NAME}-django restart: ${RESTART_POLICY} entrypoint: /django-launcher.sh volumes: - .:/usr/src/app/ env_file: .env expose: - 8000 depends_on: - postgresql - redis nginx: image: nginx:alpine restart: ${RESTART_POLICY} env_file: .env ports: - 8000:80 volumes: - ./static:/var/www/static - ./media:/var/www/media - ./nginx.conf:/etc/nginx/nginx.conf depends_on: - django redis: image: redis:alpine restart: ${RESTART_POLICY} container_name: ${PROJECT_NAME}-redis env_file: .env expose: - ${REDIS_PORT} mailhog: image: mailhog/mailhog:latest restart: ${RESTART_POLICY} container_name: ${PROJECT_NAME}-mailhog env_file: .env expose: - 1025