Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ application server, a reverse proxy, a database, a caching server, and a Celery
queue, all configured. Data is persisted in volumes, if you want to use folders,
read the warning in the env file.

**TLDR:**
**TLDR:** just do `docker compose up -d`

1. start the containers: `docker compose up -d`
1. setup offline mode storage: `docker compose exec web ./manage.py setup-powersync-storage`
The one-shot `powersync_init` service sets up the database role and schema
needed for offline mode before PowerSync starts.

For more details, consult the documentation (and the config files):

Expand Down
14 changes: 13 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ services:
retries: 5
restart: unless-stopped

powersync_init:
image: docker.io/wger/server:latest
command: ./manage.py setup-powersync-storage
env_file:
- ./config/prod.env
depends_on:
db:
condition: service_healthy
restart: "no"

powersync:
depends_on:
db:
condition: service_healthy
web:
condition: service_healthy
powersync_init:
condition: service_completed_successfully

nginx:
image: docker.io/nginx:stable
Expand Down Expand Up @@ -142,4 +154,4 @@ networks:
include:
- path: ./services/postgres.yaml
- path: ./services/powersync.yaml
- path: ./services/redis.yaml
- path: ./services/redis.yaml