Skip to content

Minimal Rust + PostgreSQL microservice (Actix Web), containerised with Docker. Includes Compose and CI publishing to Docker Hub.

License

Notifications You must be signed in to change notification settings

grthomson/docker-rust-postgres

Repository files navigation

docker-rust-postgres

CI Docker Pulls Image Size

Minimal Rust + PostgreSQL microservice using Actix Web. Containerised with Docker; includes Docker Compose and CI to Docker Hub.

Quick start (Compose)

docker compose up --build
# then visit:
# http://localhost:8000/users

Run from Docker Hub

Image is published on every push to main:

docker.io/grthomson/docker-rust-postgres:latest

Run it against a local Postgres:

docker run -p 8000:8000 \
  -e PG_HOST=host.docker.internal \
  -e PG_DBNAME=example \
  -e PG_USER=postgres \
  -e PG_PASSWORD=mysecretpassword \
  grthomson/docker-rust-postgres:latest

Endpoints

GET /users – list users (migration seeds a root user)

GET /healthz – health check

CI/CD

  • GitHub Actions builds & pushes Docker image to Docker Hub on each push to main.

About

Minimal Rust + PostgreSQL microservice (Actix Web), containerised with Docker. Includes Compose and CI publishing to Docker Hub.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published