Files
env-docker/Config/HugoExample/docker-compose.example.yml
T

35 lines
870 B
YAML

# 2025-08-13
# Configuration for running a Hugo website pulled from Git.
services:
app:
container_name: hugo
build:
context: ./
image: hyperling/hugo:$BRANCH
pull_policy: never
restart: always
ports:
- $NGINX_PORT:80 # Production minified files served using NGINX.
#- $HUGO_PORT:1380 # Development files with drafts served by Hugo Server.
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- REPO=$REPO
- BRANCH=$BRANCH
- PROD=$NGINX
- DEV=$HUGO
- BASEURL=$BASEURL
healthcheck:
test: curl -sS http://localhost:80 || curl -sS http://localhost:1380 || exit 1
interval: 1m
timeout: 10s
retries: 2
start_period: 30s
deploy:
resources:
limits:
cpus: $CPU
memory: $MEM