Just a demo project
Project description
fastapi
Runing API via podman
### create vars
export PORT="8000"
export DB_IMAGE="docker.io/library/postgres"
export DB_CONTAINER="postgresdb"
export DB_PASS="password"
export DATABASE_URL="postgresql://postgres:$DB_PASS@$DB_CONTAINER:5432"
export APP_IMAGE="ghcr.io/yulai202020/contactapi"
### create network
podman network create contactapi
### pull images
podman pull $DB_IMAGE
podman pull $APP_IMAGE
podman images
### run containers
podman run --network contactapi -e POSTGRES_PASSWORD=$DB_PASS -d --name $DB_CONTAINER $DB_IMAGE
podman run --network contactapi -e DATABASE_URL=$DATABASE_URL -e PORT=$PORT -p $PORT:$PORT -d $APP_IMAGE
### check
podman ps
curl http://localhost:8000/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
contactapi-0.0.22.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for contactapi-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b664658b32214ad4cfee6f1ae3a058c9e37d9d45014ee8cdfdfdc3ad0aad8785 |
|
MD5 | 4aab670c2c8cdf12ce6d4f51b1b85653 |
|
BLAKE2b-256 | a5bf9ad7f1121069c0b543131a71813f9df43d7e0a43c9c02fa7df45bc9be565 |