mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 14:48:19 +01:00
20 lines
709 B
Plaintext
20 lines
709 B
Plaintext
|
|
## A simple rust project for microservices using rust, actix, and postgres
|
||
|
|
|
||
|
|
This project contains a simple rust project for microservices using rust, actix, and postgres.
|
||
|
|
|
||
|
|
The `Dockerfile` in this project is used to build a docker image for the rust project, the output Docker image is a from scratch image that contains the rust binary.
|
||
|
|
|
||
|
|
### Building and running the docker image
|
||
|
|
|
||
|
|
To build the docker image, run the following command:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
> docker build -t f:latest .
|
||
|
|
```
|
||
|
|
|
||
|
|
To run the docker image, run the following command:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
docker run -i -e RUST_LOG="debug" -e DATABASE_URL="postgresql://postgres:postgres@host.docker.internal:5432/database" -e LISTEN="0.0.0.0:8080" -p 8080:8080 f:latest
|
||
|
|
```
|