{"id":15639023,"url":"https://github.com/driftluo/myblog","last_synced_at":"2026-02-01T12:00:55.922Z","repository":{"id":49393037,"uuid":"109560110","full_name":"driftluo/myblog","owner":"driftluo","description":"Personal blog written in Rust, using salvo and sqlx","archived":false,"fork":false,"pushed_at":"2024-12-28T04:00:07.000Z","size":5189,"stargazers_count":118,"open_issues_count":2,"forks_count":27,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-25T16:06:29.738Z","etag":null,"topics":["blog","rust"],"latest_commit_sha":null,"homepage":"https://www.driftluo.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/driftluo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-11-05T07:30:44.000Z","updated_at":"2025-04-14T14:48:58.000Z","dependencies_parsed_at":"2025-02-12T12:11:04.854Z","dependency_job_id":"61c30dc6-0b0a-4a58-9694-78e36aebb99e","html_url":"https://github.com/driftluo/myblog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/driftluo/myblog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2Fmyblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2Fmyblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2Fmyblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2Fmyblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/driftluo","download_url":"https://codeload.github.com/driftluo/myblog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2Fmyblog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28977643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T11:31:13.034Z","status":"ssl_error","status_checked_at":"2026-02-01T11:30:25.558Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["blog","rust"],"created_at":"2024-10-03T11:24:23.697Z","updated_at":"2026-02-01T12:00:55.912Z","avatar_url":"https://github.com/driftluo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\n\nThis is my personal blog.\n\n## Architecture\n\n![img](imges/architecture.webp)\n\n## Status\n\n- [ ] js uses a very old technology (I'm not familiar with the front-end technology)\n\n## Dependences\n- Redis\n- Postgresql\n\n## Getting Started\n\n### [Rust](https://www.rust-lang.org/)\n\n```\n$ curl https://sh.rustup.rs -sSf | sh\n```\n\n### [Sqlx Cli](https://github.com/launchbadge/sqlx)\nThis project use sqlx as Orm framework, so you need to install its command line tool via Rust package manager(eg, Cargo)\n```bash\n$ cargo install sqlx-cli\n```\n\n### [Postgresql](https://www.postgresql.org/)\nUse docker images\n\n#### Install from docker-hub\n```bash\n$ docker pull postgres\n$ docker run --name your_container_name -e POSTGRES_PASSWORD=system -d -p 5432:5432 postgres\n```\n\n#### If you want to enter psql interactive command line\n```bash\n$ docker run -it --rm --link your_container_name:postgres postgres psql -h postgres -U postgres\n```\n\n#### init database\n```bash\n$ sqlx database create\n$ sqlx migrate run\n```\n\n### [Redis](https://github.com/redis/redis)\nUse docker images\n\n```bash\n$ docker pull redis\n$ docker run --name redis -p 6379:6379 -d redis\n```\n\n### [Nginx](http://nginx.org/en/download.html)\nnginx is only used when deploying production\n\n##### config:\n```\nserver {\n        listen       80;\n        server_name  127.0.0.1;\n\n        location / {\n            proxy_pass http://127.0.0.1:8080;\n            proxy_redirect off;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        }\n\n        location /api/v1 {\n            proxy_pass http://127.0.0.1:8080;\n            proxy_redirect off;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        }\n```\n\n### blog\n```\n$ cargo run --release // listen on 127.0.0.1:8080\n```\n\nif you want to login admin, the account is `admin`, password is `admin`\n\n## Using Docker Compose\n\nThis project includes `docker-compose.yml` to run the application together with Postgres and Redis using container-friendly settings.\n\nQuick start (recommended):\n\n1. Copy or create the compose env file. A compose-specific file named `.env.compose` is provided. Do NOT overwrite your development `.env`.\n\n```bash\n# if you want to edit values, copy the example first:\ncp .env.compose .env.compose.local\n# edit .env.compose.local as needed, then\n# (optional) move/rename to .env.compose if you prefer\n```\n\n2. Build and start services:\n\n```bash\ndocker compose up --build\n# or run in background\ndocker compose up -d --build\n```\n\n3. View logs:\n\n```bash\ndocker compose logs -f blog\n```\n\n4. Database migrations (optional):\n\nIf you want the `blog` container to run migrations, either exec into the container and run `sqlx migrate run` (requires `sqlx-cli` available), or run migrations from your host against the compose DB:\n\n```bash\n# run migrations from host (requires DATABASE_URL in .env.compose to point to compose db)\nsqlx database create\nsqlx migrate run\n```\n\nNotes\n- The project `.env` is reserved for native development and is not used by compose. Compose loads `.env.compose` into the `blog` container.\n- `.env.compose` is included in `.gitignore` to avoid committing secrets. Use `.env.example` or `.env.compose` as a template.\n- If you change service names or ports in `docker-compose.yml`, update `.env.compose` accordingly.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriftluo%2Fmyblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdriftluo%2Fmyblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriftluo%2Fmyblog/lists"}