[Unit] Description=Webanwendung After=datenbank.service Requires=datenbank.service [Container] Image=localhost/webapp:aktuell ContainerName=webapp Network=appnetz.network PublishPort=8080:8080 Environment=DB_HOST=datenbank Environment=DB_NAME=appdb Environment=DB_USER=app Secret=db_passwort,type=env,target=DB_PASSWORD Volume=%h/repo/config/nginx.conf:/etc/nginx/nginx.conf:ro,Z HealthCmd=curl -f http://localhost:8080/health || exit 1 HealthInterval=30s ReadOnly=true Tmpfs=/tmp:rw,size=64m NoNewPrivileges=true DropCapability=ALL AddCapability=NET_BIND_SERVICE Memory=512m [Service] Restart=always [Install] WantedBy=default.target