services: sapienzastudents: build: . container_name: sapienzastudents environment: # Change to "true" to generate local aliases, "false" to remove them - GENERATE_ALIASES=false # Generate source-aware footer metadata by default. # Set GENERATE_SOURCE_METADATA=false to disable it. - GENERATE_SOURCE_METADATA=${GENERATE_SOURCE_METADATA:-true} volumes: # Mount the current directory to the container # This is useful for updating the website without rebuilding the container - ".:/app" # Preserve build-time artifacts from being overwritten by the bind mount - /app/node_modules - /app/static/generated ports: # Map the container's port 1313 to the host's port 1313 # If you need to use a reverse proxy, comment this line - "1313:1313" # Check the env variable: if true, builds public/ and generates aliases. # If false, runs the python script just to clean up static/ command: > sh -c ' if [ "$$GENERATE_ALIASES" = "true" ]; then hugo && python3 generate_aliases.py; else python3 generate_aliases.py; fi && npm run dev & hugo server --disableFastRender --bind 0.0.0.0 ' # Will restart the container if it crashes # Even after a reboot restart: unless-stopped