29 lines
817 B
Plaintext
29 lines
817 B
Plaintext
|
[Unit]
|
||
|
Description=Gitea Container
|
||
|
After=docker.service
|
||
|
After=dockerdata.mount
|
||
|
Requires=docker.service
|
||
|
Requires=dockerdata.mount
|
||
|
|
||
|
[Service]
|
||
|
TimeoutStartSec=0
|
||
|
Restart=always
|
||
|
ExecStartPre=-/usr/bin/docker stop gitea
|
||
|
ExecStartPre=-/usr/bin/docker rm gitea
|
||
|
ExecStartPre=-/usr/bin/docker pull gitea/gitea:latest
|
||
|
ExecStart=/usr/bin/docker run \
|
||
|
-p 222:22 \
|
||
|
-l "traefik.enable=true" \
|
||
|
-l "traefik.http.routers.gitea.rule=Host(`git.t-juice.club`)" \
|
||
|
-l "traefik.http.routers.gitea.tls=true" \
|
||
|
-l "traefik.http.routers.gitea.tls.certresolver=le" \
|
||
|
-l "traefik.http.services.gitea.loadbalancer.server.port=3000" \
|
||
|
-v /dockerdata/gitea:/data \
|
||
|
-v /etc/localtime:/etc/localtime:ro \
|
||
|
-v /etc/timezone:/etc/timezone:ro \
|
||
|
--network proxy \
|
||
|
--name gitea gitea/gitea:latest
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|