[Unit] Description=Jupyterlab Notebook Service Requires=docker.service After=docker.service [Service] Type=oneshot RemainAfterExit=yes WorkingDirectory=/opt/jupyterlab ExecStartPre=/bin/sh -c 'echo JUPYTERLAB_HOSTNAME=$(hostname) > /opt/jupyterlab/.env' ExecStart=docker compose --env-file /opt/jupyterlab/.env -f /opt/jupyterlab/docker-compose-jupyterlab.yaml up -d ExecStop=docker compose -f /opt/jupyterlab/docker-compose-jupyterlab.yaml down [Install] WantedBy=multi-user.target