File tree Expand file tree Collapse file tree
podman/podman-play-example Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ POSTGRES_USER = sunnysummer1969
2+ POSTGRES_PASSWORD = " aRanDomStringW1thCh#rs"
3+ POSTGRES_DB = joplin
4+ POSTGRES_PORT = 5432
5+
6+ JOPLIN_SERVER_HOST_PORT = 8080
7+ JOPLIN_SERVER_BASE_URL = http://localhost:8080
8+ JOPLIN_SERVER_PORT = 22300
9+ JOPLIN_SERVER_DB_CLIENT = pg
Original file line number Diff line number Diff line change 1+ joplin-pod-substituted.yaml
Original file line number Diff line number Diff line change 1+ joplin-pod-substituted.yaml
Original file line number Diff line number Diff line change 1+ #Podman Play Kube Example
2+
3+ Docker compose alternative for Podman
4+
5+ ``` sh
6+ ./run.sh
7+ ```
8+
9+ Sever running at http://localhost:8080
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Pod
3+ metadata :
4+ labels :
5+ app : joplin
6+ name : joplin-pod
7+ spec :
8+ containers :
9+ - name : joplin-db
10+ image : postgres:16
11+ env :
12+ - name : POSTGRES_PASSWORD
13+ value : ${POSTGRES_PASSWORD}
14+ - name : POSTGRES_USER
15+ value : ${POSTGRES_USER}
16+ - name : POSTGRES_DB
17+ value : ${POSTGRES_DB}
18+
19+ - name : joplin-server
20+ image : joplin/server:latest
21+ env :
22+ - name : APP_PORT
23+ value : ${JOPLIN_SERVER_PORT}
24+ - name : APP_BASE_URL
25+ value : ${JOPLIN_SERVER_BASE_URL}
26+ - name : DB_CLIENT
27+ value : ${JOPLIN_SERVER_DB_CLIENT}
28+ - name : POSTGRES_PASSWORD
29+ value : ${POSTGRES_PASSWORD}
30+ - name : POSTGRES_DATABASE
31+ value : ${POSTGRES_DB}
32+ - name : POSTGRES_USER
33+ value : ${POSTGRES_USER}
34+ - name : POSTGRES_PORT
35+ value : ${POSTGRES_PORT}
36+ - name : POSTGRES_HOST
37+ value : joplin-db
38+ ports :
39+ - containerPort : ${JOPLIN_SERVER_PORT}
40+ hostPort : ${JOPLIN_SERVER_HOST_PORT}
41+ protocol : TCP
Original file line number Diff line number Diff line change 1+ export $( grep -v ' ^#' .env | xargs)
2+ envsubst < joplin-pod.yaml > joplin-pod-substituted.yaml
3+ podman play kube ./joplin-pod-substituted.yaml
Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ http://localhost:3000
1010
1111### Run the stack
1212
13+ Make sure Docker is running.
14+
1315```
14- podman compose up -d
16+ ./start.sh
1517```
1618
1719## Tips & Tricks
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ services:
2626 image : ghcr.io/open-webui/open-webui:main
2727 container_name : openwebui
2828 ports :
29- - " 3000 :8080"
29+ - " 3333 :8080"
3030 volumes :
31- - open-webui:/app/backend/data
31+ - open-webui-podman :/app/backend/data
3232 depends_on :
3333 - ollama
3434 restart : unless-stopped
@@ -42,7 +42,7 @@ services:
4242
4343volumes :
4444 ollama :
45- open-webui :
45+ open-webui-podman :
4646
4747networks :
4848 openwebui :
@@ -51,8 +51,8 @@ networks:
5151
5252 offline_network :
5353 driver : bridge
54- driver_opts :
55- com.docker.network.bridge.enable_ip_masquerade : " ${ONLINE}"
54+ # driver_opts:
55+ # com.docker.network.bridge.enable_ip_masquerade: "${ONLINE}"
5656 ipam :
5757 driver : default
5858 config :
Original file line number Diff line number Diff line change 11export ONLINE=true
2- DEFAULT_MODEL=" tinydolphin "
2+ DEFAULT_MODEL=" llama3.2:3b "
33
44# only for podman: setup correct limits
5- # podman machine stop
6- # podman machine set --cpus 8 --memory 8192
7- # podman machine start
5+ podman machine stop
86
9- docker compose up -d
7+
8+
9+
10+ docker-compose up -d
1011docker exec -it ollama ollama pull ${DEFAULT_MODEL}
1112
12- docker compose down
13+ # podman compose down
1314
14- ONLINE=false
15+ # ONLINE=false
1516
16- docker compose up -d
17+ # podman compose up -d
1718
Original file line number Diff line number Diff line change 11export ONLINE=false
2- docker compose down
2+ podman compose down
You can’t perform that action at this time.
0 commit comments