Skip to content

flexchar/turso-sync

Repository files navigation

turso-sync

Packages: https://github.com/flexchar/turso-sync/pkgs/container/turso-sync GitHub: https://github.com/flexchar/turso-sync

This is to solve personal problem but could also be made for others. To do so, I'd like to build a dedicated image for each platform.

To install dependencies:

bun install
cp .env.example .env

To test docker locally:

docker build -t turso-sync:local . && docker run --rm -it --env-file .env -v turso-volume:/turso turso-sync:local

using docker compose:

docker compose up --build --force-recreate

To build:

now=$(date +%s)
tag="ghcr.io/flexchar/turso-sync:$now"
echo "building image for tag: $tag"
docker build --platform=linux/amd64 -t $tag -t ghcr.io/flexchar/turso-sync:latest .
docker push $tag

To use in Docker Compose

services:
    #...other services
    turso-sync:
        image: ghcr.io/flexchar/turso-sync:latest
        volumes:
            - turso_data:/turso
        environment:
            - LIBSQL_DB_URL=${LIBSQL_DB_URL}
            - LIBSQL_DB_AUTH_TOKEN=${LIBSQL_DB_AUTH_TOKEN}
            - OUTPUT_DB_PATH=${OUTPUT_DB_PATH}
            - SYNC_INTERVAL=${SYNC_INTERVAL}

volumes:
    turso_data:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages