make deployment process auto replace old containers

This commit is contained in:
Late Night Defender 2023-07-31 16:36:53 +00:00
parent 7221586818
commit e0879c51f8

View file

@ -14,12 +14,12 @@ container-build:
script:
- sed -i "s/DATE/$(date -I)/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
- podman build -t little-lines:$(git log -1 --oneline | awk '{print $1}') .
- podman build -t little-lines .
container-deploy:
stage: deploy
script:
- podman run --name little-lines -p 8081:80 -d little-lines:$(git log -1 --oneline | awk '{print $1}')
- podman run --name little-lines -p 8081:80 -d little-lines
- podman generate systemd little-lines > ~/.config/systemd/user/little-lines.service
- systemctl --user daemon-reload
- systemctl --user enable little-lines