Skip to content

Commit 746aa76

Browse files
authored
Add Podman setup guide for macOS
Added a comprehensive setup guide for using Podman on macOS, including installation instructions, setup scripts, useful commands, and memory requirements.
1 parent cbd1c5c commit 746aa76

File tree

1 file changed

+181
-0
lines changed

1 file changed

+181
-0
lines changed

docs/podman-osx.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
## Setup Script for Podman on macOS:
2+
3+
```bash
4+
# Create named Podman volumes
5+
podman volume create postgres-data
6+
podman volume create confluence-data
7+
8+
# Create a pod to allow containers to communicate via localhost
9+
podman pod create --name confluence-pod \
10+
-p 8090:8090 \
11+
-p 8091:8091 \
12+
-p 5005:5005
13+
14+
# Run postgres in the pod
15+
podman run --name postgres \
16+
--pod confluence-pod \
17+
-v postgres-data:/var/lib/postgresql/data \
18+
-e POSTGRES_PASSWORD=mysecretpassword \
19+
-d postgres
20+
21+
# Run confluence in the pod with appropriate memory settings
22+
podman run --name=confluence \
23+
--pod confluence-pod \
24+
-v confluence-data:/var/atlassian/application-data/confluence \
25+
-d \
26+
-e JVM_MINIMUM_MEMORY=1536m \
27+
-e JVM_MAXIMUM_MEMORY=1536m \
28+
-e JVM_SUPPORT_RECOMMENDED_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" \
29+
atlassian/confluence-server:latest
30+
```
31+
32+
## Confluence Setup Instructions:
33+
34+
**Configure Postgres database connection:**
35+
* JDBC URL: `jdbc:postgresql://localhost:5432/postgres`
36+
* User: `postgres`
37+
* Password: `mysecretpassword`
38+
39+
**Access Confluence:**
40+
* Open your browser to `http://localhost:8090`
41+
* Follow the setup wizard and use the database credentials above
42+
43+
## Useful Commands:
44+
45+
```bash
46+
# View running containers
47+
podman ps
48+
49+
# View all containers (including stopped)
50+
podman ps -a
51+
52+
# View logs
53+
podman logs confluence
54+
podman logs postgres
55+
56+
# Follow logs in real-time
57+
podman logs -f confluence
58+
59+
# Stop everything
60+
podman pod stop confluence-pod
61+
62+
# Start everything
63+
podman pod start confluence-pod
64+
65+
# Restart everything
66+
podman pod restart confluence-pod
67+
68+
# Remove everything (containers and pod, but keeps volumes)
69+
podman pod rm -f confluence-pod
70+
71+
# List volumes
72+
podman volume ls
73+
74+
# Remove volumes (WARNING: deletes all data)
75+
podman volume rm postgres-data confluence-data
76+
```
77+
78+
## Podman Machine Commands (macOS Specific):
79+
80+
On macOS, Podman runs inside a lightweight VM. Here's what you need to know:
81+
82+
### First-time Setup:
83+
```bash
84+
# Initialize the Podman machine with 5GB memory (only once)
85+
podman machine init --memory 5120 --disk-size 50
86+
87+
# Start the machine
88+
podman machine start
89+
```
90+
91+
### If you already have a machine:
92+
```bash
93+
# Stop the existing machine
94+
podman machine stop
95+
96+
# Update memory settings to 5GB
97+
podman machine set --memory 5120
98+
99+
# Start the machine
100+
podman machine start
101+
102+
# Verify settings
103+
podman machine info | grep -i memory
104+
```
105+
106+
### Daily Usage:
107+
```bash
108+
# After each macOS reboot, start the machine
109+
podman machine start
110+
111+
# Check machine status
112+
podman machine list
113+
114+
# Stop the machine (optional, before shutting down Mac)
115+
podman machine stop
116+
```
117+
118+
### When to run machine commands:
119+
- **Once ever**: `podman machine init --memory 5120` (initial setup)
120+
- **After each reboot**: `podman machine start`
121+
- **Between container operations**: NOT needed - machine stays running
122+
- **Normal development**: Just use `podman` commands, ignore the machine
123+
124+
### Optional - Auto-start on boot:
125+
```bash
126+
podman machine set --autostart=true
127+
```
128+
129+
### Common machine commands:
130+
```bash
131+
# View machine info
132+
podman machine info
133+
134+
# SSH into the machine (for troubleshooting)
135+
podman machine ssh
136+
137+
# Remove machine (clean slate)
138+
podman machine stop
139+
podman machine rm
140+
```
141+
142+
## Installation:
143+
144+
If you haven't installed Podman yet, see the official guide:
145+
**https://podman.io/docs/installation#macos**
146+
147+
Quick install via Homebrew:
148+
```bash
149+
brew install podman
150+
podman machine init --memory 5120 --disk-size 50
151+
podman machine start
152+
```
153+
154+
## Memory Requirements:
155+
156+
- **Podman VM**: 5GB (provides comfortable headroom for Confluence, Postgres, and OS)
157+
- **Confluence JVM**: 1.5GB heap (suitable for small/test instances)
158+
- This configuration supports ~350 users with 15,000 pages according to Atlassian's guidelines
159+
160+
If you experience memory issues, you can increase the VM memory:
161+
```bash
162+
podman machine stop
163+
podman machine set --memory 6144 # Increase to 6GB if needed
164+
podman machine start
165+
```
166+
167+
## Podman vs Docker:
168+
169+
If you're coming from Docker:
170+
- `docker``podman` (commands are nearly identical)
171+
- `docker-compose``podman-compose` or use pods
172+
- On macOS, both use a VM, but Podman is daemonless
173+
- Podman pods = multiple containers sharing network namespace (like Kubernetes pods)
174+
175+
## Tips for Beginners:
176+
177+
1. **Named volumes** (like `postgres-data`) are managed by Podman and persist data automatically
178+
2. **Pods** group containers together - they share the same network, so they can talk via `localhost`
179+
3. **Machine must be running** before any `podman` commands work on macOS
180+
4. Use `podman ps` frequently to check what's running
181+
5. Logs are your friend: `podman logs <container-name>`

0 commit comments

Comments
 (0)