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.20.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for contactapi-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6736302c574ca8e7ea2ab56ae768acaa12cdfca6e012a2c95a131943d03905ac |
|
MD5 | 64315de5c97cf777febc24f833cc534b |
|
BLAKE2b-256 | b2f91184c2d9e47930439e8a7fad2253f48381dfbf724c958bb229ddaf70f115 |