Skip to content

Commit a5f05f0

Browse files
committed
docs: github and dockerhub readmes
1 parent 1445afe commit a5f05f0

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ jobs:
2828
context: .
2929
push: true
3030
tags: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest
31+
32+
- name: Update Docker Hub description
33+
uses: crazy-max/ghaction-dockerhub-description@v4
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
repository: grthomson/docker-rust-postgres
38+
readme-filepath: README.Docker.md

README.Docker.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
### Building and running your application
1+
# grthomson/docker-rust-postgres
22

3-
When you're ready, start your application by running:
4-
`docker compose up --build`.
3+
Minimal Rust + PostgreSQL service (Actix Web).
54

6-
Your application will be available at http://localhost:8000.
5+
## Usage
6+
```bash
7+
docker pull grthomson/docker-rust-postgres:latest
8+
docker run -p 8000:8000 \
9+
-e PG_HOST=host.docker.internal \
10+
-e PG_DBNAME=example \
11+
-e PG_USER=postgres \
12+
-e PG_PASSWORD=mysecretpassword \
13+
grthomson/docker-rust-postgres:latest
14+
```
715

8-
### Deploying your application to the cloud
16+
## Endpoints
917

10-
First, build your image, e.g.: `docker build -t myapp .`.
11-
If your cloud uses a different CPU architecture than your development
12-
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
13-
you'll want to build the image for that platform, e.g.:
14-
`docker build --platform=linux/amd64 -t myapp .`.
15-
16-
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`.
17-
18-
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/)
19-
docs for more detail on building and pushing.
20-
21-
### References
22-
* [Docker's Rust guide](https://docs.docker.com/language/rust/)
18+
```GET /users```, ```GET /healthz```

0 commit comments

Comments
 (0)