networks: app-network: driver: bridge services: nginx: build: context: ./nginx dockerfile: Dockerfile container_name: nginx env_file: ./.env restart: unless-stopped depends_on: - backend networks: - app-network ports: - 80:80 - 443:443 volumes: - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot - ./html/:/etc/nginx/html:ro certbot: image: certbot/certbot container_name: certbot volumes: - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot command: certonly --webroot -w /var/www/certbot --email ${EMAIL} -d ${DOMAIN} -d www.${DOMAIN} --agree-tos --non-interactive networks: - app-network certbot-renew: image: certbot/certbot container_name: certbot-renew volumes: - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;" networks: - app-network backend: build: context: ./backend dockerfile: Dockerfile container_name: "${BACKEND_HOST}" restart: unless-stopped depends_on: - db networks: - app-network env_file: - ./.env db: image: postgres:16 container_name: "${POSTGRES_HOST}" restart: unless-stopped env_file: - ./.env networks: - app-network icecast2: platform: linux/amd64 build: context: ./icecast dockerfile: Dockerfile container_name: "${ICECAST_HOST}" restart: always env_file: - ./.env