{"id":18828722,"url":"https://github.com/nxy7/sqlx-cli-container","last_synced_at":"2026-01-23T05:30:16.821Z","repository":{"id":159217694,"uuid":"627012282","full_name":"nxy7/sqlx-cli-container","owner":"nxy7","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-05T13:20:26.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T11:18:36.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nxy7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-12T15:51:39.000Z","updated_at":"2023-04-12T17:28:43.000Z","dependencies_parsed_at":"2023-06-03T11:45:18.895Z","dependency_job_id":null,"html_url":"https://github.com/nxy7/sqlx-cli-container","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxy7%2Fsqlx-cli-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxy7%2Fsqlx-cli-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxy7%2Fsqlx-cli-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxy7%2Fsqlx-cli-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nxy7","download_url":"https://codeload.github.com/nxy7/sqlx-cli-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763740,"owners_count":19692839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T01:35:34.283Z","updated_at":"2026-01-23T05:30:16.748Z","avatar_url":"https://github.com/nxy7.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"Repository containing recipe for sqlx-cli docker image published to Docker Hub.\nI'm using nix dockerTools to make resulting image as small as possible.\n\nI've made this image to have recent version of sqlx-cli to run migrations with docker compose instead of putting them in my app, which seems like much better workflow.\n\nIt's just sqlx-cli packaged into container, so you can refer to https://github.com/launchbadge/sqlx/tree/main/sqlx-cli for additional documentation.\n\n# Usage\n\n## With docker\n```bash\n  docker run -v ./migrations:/migrations nxyt/sqlx-cli:latest migrate run --database-url=postgres://postgres:dev@172.17.0.1:5432/postgres\n```\n\n## With docker compose\n```yaml\n  migrate:\n    image: nxyt/sqlx-cli\n    # optional if you want to wait till database containers is ready to accept connections \n    # depends_on:\n    #   db:\n    #     condition: service_healthy\n    command: migrate run\n    volumes:\n      - ./migrations:/migrations\n    environment:\n      - DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable  \n``` \n\n# Build image locally\n\n## Prerequisites\n```bash\n  nix\n  docker\n```\n\n## Commands\n```bash\n  nix build .\n  docker load -i result\n  # image is available as sqlx-cli:latest\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxy7%2Fsqlx-cli-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxy7%2Fsqlx-cli-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxy7%2Fsqlx-cli-container/lists"}