prepare for hosting
All checks were successful
Build and Push Container / build-and-push (push) Successful in 13s
All checks were successful
Build and Push Container / build-and-push (push) Successful in 13s
This commit is contained in:
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.gitea
|
||||||
|
README.md
|
||||||
|
.dockerignore
|
||||||
|
*.md
|
||||||
@@ -27,6 +27,8 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: gitea.reeseapps.com/services/alicia-ai-terminology
|
images: gitea.reeseapps.com/services/alicia-ai-terminology
|
||||||
|
tags: |
|
||||||
|
type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -24,13 +24,33 @@ python3 -m http.server 8080
|
|||||||
|
|
||||||
Then open `http://localhost:8080`.
|
Then open `http://localhost:8080`.
|
||||||
|
|
||||||
## Podman
|
## Podman (Quadlet)
|
||||||
|
|
||||||
Build and run with Podman:
|
Run with Podman quadlets for systemd integration:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.config/containers/systemd
|
||||||
|
cp alicia_demo.container ~/.config/containers/systemd/
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user start alicia_demo.service
|
||||||
|
```
|
||||||
|
|
||||||
|
Then open `http://localhost:8080`.
|
||||||
|
|
||||||
|
Stop and remove:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl --user stop alicia_demo.service
|
||||||
|
systemctl --user disable alicia_demo.service
|
||||||
|
rm ~/.config/containers/systemd/alicia_demo.container
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
```
|
||||||
|
|
||||||
|
Build and run directly:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
podman build -t alicia-ai-cheatsheet .
|
podman build -t alicia-ai-cheatsheet .
|
||||||
podman run -d --name alicai-ai-cheatsheet -p 9090:80 alicia-ai-cheatsheet
|
podman run -d --name alicia-ai-cheatsheet -p 9090:8080 alicia-ai-cheatsheet
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open `http://localhost:9090`.
|
Then open `http://localhost:9090`.
|
||||||
@@ -38,8 +58,8 @@ Then open `http://localhost:9090`.
|
|||||||
Stop and remove:
|
Stop and remove:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
podman stop alicai-ai-cheatsheet
|
podman stop alicia-ai-cheatsheet
|
||||||
podman rm alicai-ai-cheatsheet
|
podman rm alicia-ai-cheatsheet
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|||||||
18
alicia_demo.container
Normal file
18
alicia_demo.container
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[Container]
|
||||||
|
ContainerName=alicia_demo
|
||||||
|
PublishPort=8080:8080/tcp
|
||||||
|
Image=gitea.reeseapps.com/services/alicia-ai-terminology:main
|
||||||
|
HealthCheckInterval=30s
|
||||||
|
HealthCheckTimeout=10s
|
||||||
|
HealthCheckRetries=5
|
||||||
|
HealthCheckCommand=WGET --spider --quiet http://localhost:8080
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Alicia Demo Web Service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Reference in New Issue
Block a user