mirror of
https://gitlab.com/little-lines/backend.git
synced 2024-11-24 09:06:50 +00:00
Upgrade CI to use Quadlets
This commit is contained in:
parent
1a7b7e4333
commit
e90d8a9f70
2 changed files with 20 additions and 7 deletions
|
@ -6,18 +6,17 @@ stages:
|
||||||
remove-old-services:
|
remove-old-services:
|
||||||
stage: prepare
|
stage: prepare
|
||||||
script:
|
script:
|
||||||
- podman stop ll-backend
|
- systemctl --user stop little-lines-backend
|
||||||
- podman rm ll-backend
|
- podman rm --force little-lines-backend
|
||||||
|
- cp little-lines-backend.container ~/.config/containers/systemd
|
||||||
|
- systemctl --user daemon-reload
|
||||||
|
|
||||||
container-build:
|
container-build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- podman build -t ll-backend .
|
- podman build -t little-lines-backend .
|
||||||
|
|
||||||
container-deploy:
|
container-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- podman run --name ll-backend -p 5001:5001 -v /home/sasha/Data1/Apps/ll-backend/.env:/opt/ll-backend/.env -d ll-backend
|
- systemctl --user start little-lines-backend
|
||||||
- podman generate systemd ll-backend > ~/.config/systemd/user/ll-backend.service
|
|
||||||
- systemctl --user daemon-reload
|
|
||||||
- systemctl --user enable ll-backend
|
|
||||||
|
|
14
little-lines-backend.container
Normal file
14
little-lines-backend.container
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Little Lines backend container
|
||||||
|
|
||||||
|
[Container]
|
||||||
|
ContainerName=little-lines-backend
|
||||||
|
Image=localhost/little-lines-backend
|
||||||
|
PublishPort=5001:5001
|
||||||
|
Volume= /media/sasha/Data1/Apps/ll-backend/.env:/opt/ll-backend/.env
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target default.target
|
Loading…
Reference in a new issue