{ % block content % } { % endblock % } POSTGRES_USER=admin POSTGRES_PASSWORD=adminpassword POSTGRES_DB=mydatabase POSTGRES_HOST=localhost version: '3.8' services: postgres: image: postgres container_name: my_postgres restart: always environment: POSTGRES_USER: myuser POSTGRES_PASSWORD: mypassword POSTGRES_DB: mydatabase ports: - "5432:5432" networks: - pg_network pgadmin: image: dpage/pgadmin4 container_name: my_pgadmin restart: always environment: PGADMIN_DEFAULT_EMAIL: admin@example.com PGADMIN_DEFAULT_PASSWORD: admin123 ports: - "5050:80" depends_on: - postgres networks: - pg_network networks: pg_network: driver: bridge from fastapi import FastAPI from fastapi.templating import Jinja2Templates app = FastAPI() templates = Jinja2Templates(directory="templates") @app.get("/", response_class=HTMLResponse) def home(request: Request): return templates.TemplateResponse( request=request, name="item.html", context={"id":id} )