# Exercise 9 — Environment Variables

# Single variables via -e
podman run -d --name mydb \
  -e POSTGRES_DB=myapp \
  -e POSTGRES_USER=app \
  -e POSTGRES_PASSWORD=secret \
  postgres:16-alpine

# Verify
podman exec -ti mydb psql -U app myapp -c "\l"

podman rm -f mydb

# Via env-file
podman run -d --name mydb \
  --env-file app.env \
  postgres:16-alpine

podman exec -ti mydb psql -U app myapp -c "\l"

# Cleanup
podman rm -f mydb
