Just a demo project
Project description
fastapi
Runing API via podman
### create vars
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 -p 8000:8000 -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.18.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for contactapi-0.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0c868f4d432c4dd0f16eff329661315549ed1f728861dc137746e8f743868c0 |
|
MD5 | 87c030a2576bc0d026b4a9331b8ba7b1 |
|
BLAKE2b-256 | ebd7f08162f5e53cf568f27d20d8822aa17d1d9f0771db0170ae69450bc148e7 |