-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpodman-compose.yaml
More file actions
62 lines (58 loc) · 1.71 KB
/
podman-compose.yaml
File metadata and controls
62 lines (58 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This is for LOCAL DEVELOPMENT only
# - Frontend and source code mounted as volumes for hot-reloading
# - Source code is mounted as a volume
# - Production deployments use Podman pod specifications
version: "3.8"
services:
pocketbase:
build:
context: ./backend
dockerfile: Containerfile
args:
POCKETBASE_VERSION: 0.34.0
container_name: pocketbase
ports:
- "8080:8080"
volumes:
# Mount pb_data for persistent storage (SQLite database, uploaded files, etc.)
- ./backend/pb_data:/pb_data
# Optional: mount migrations if you have any
- ./backend/pb_migrations:/pb_migrations
environment:
# Add any environment variables PocketBase might need
# For now, defaults are fine
- TZ=UTC
# Override CMD to explicitly use mounted volumes for data and migrations
command:
[
"pocketbase",
"serve",
"--http=0.0.0.0:8080",
"--dir=/pb_data",
"--migrationsDir=/pb_migrations",
]
restart: unless-stopped
cscs:
build:
context: .
dockerfile: Containerfile
container_name: cscs-website
ports:
- "4321:4321"
volumes:
# Mount the entire project directory to /app for hot-reloading
- .:/app:z
# Use an anonymous volume to hide host node_modules and use the container's
- /app/node_modules
command: ["npm", "run", "dev", "--", "--host"]
environment:
# PocketBase URL (client-side only - static site)
# Must use localhost for browser access
- PUBLIC_POCKETBASE_URL=http://localhost:8080
depends_on:
pocketbase:
condition: service_started
restart: unless-stopped
networks:
default:
name: cscs-network