Skip to main content

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


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.24.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

contactapi-0.0.24-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file contactapi-0.0.24.tar.gz.

File metadata

  • Download URL: contactapi-0.0.24.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for contactapi-0.0.24.tar.gz
Algorithm Hash digest
SHA256 0abc16c028c5cb81125d0baee5805878be8d57b1029b6d62a945062922173de2
MD5 345c0bfd6fff97e68d6d72acbca0c171
BLAKE2b-256 eba62758ea6295163b5d7ba3a5c09dc9e7dd9d0ae6936954de32bfc5d4c3fa61

See more details on using hashes here.

File details

Details for the file contactapi-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: contactapi-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for contactapi-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 2de094cd05374446635d127ea22fb5a002657411c247b256453290ce27eb9515
MD5 ebddc45a75ce1620db8ac2794b80528f
BLAKE2b-256 fea5276dece60071317b6889c5e0bcbdcfee186ee1b365be561d9ebc16d38c77

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page