{"id":144,"date":"2024-09-17T03:42:37","date_gmt":"2024-09-17T03:42:37","guid":{"rendered":"https:\/\/scoutdillpickle.com\/?p=144"},"modified":"2024-09-17T16:50:02","modified_gmt":"2024-09-17T16:50:02","slug":"launch-local-docker-fast-api-with-postgres-database","status":"publish","type":"post","link":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/","title":{"rendered":"Launch local docker Fast API with PostGres database"},"content":{"rendered":"\n<p>First install Docker Desktop. <\/p>\n\n\n\n<p>Create a new repository on Bitbucket or wherever you want. <\/p>\n\n\n\n<p>Clone your repository to your computer. Navigate to your repository using PowerTools, iTerm &#8211; whichever one you like best and can run on your workstation.<\/p>\n\n\n\n<p>Next, open your code editor. Visual Studio Code is pretty good and free. If you&#8217;re in your repository directory you should be able to type:<\/p>\n\n\n\n<p>code .<\/p>\n\n\n\n<p>Press enter and you&#8217;ll be in there. <\/p>\n\n\n\n<p>Create a new directory called &#8216;app&#8217;.<\/p>\n\n\n\n<p>Your folder and file structure should end up looking like this. Go ahead and create it all now. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"542\" src=\"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/directory-structure.png\" alt=\"\" class=\"wp-image-145\"\/><\/figure>\n\n\n\n<p>Open the requirements.txt file and paste in the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fastapi&#91;standard]&gt;=0.113.0,&lt;0.114.0\npydantic&gt;=2.7.0,&lt;3.0.0<\/code><\/pre>\n\n\n\n<p>Open the Dockerfile and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nFROM python:3.10\n\n\nWORKDIR \/code\n\n\nCOPY .\/requirements.txt \/code\/requirements.txt\n\n\nRUN pip install --no-cache-dir --upgrade -r \/code\/requirements.txt\nRUN pip install flask_sqlalchemy\nRUN pip install psycopg2\n\nCOPY .\/app \/code\/app\n\n\nCMD &#91;\"fastapi\", \"run\", \"app\/main.py\", \"--port\", \"8000\"]\n\n<\/code><\/pre>\n\n\n\n<p>Open you docker-compose.yml and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  web:\n    image: fastapi\n    build: .\n    command: uvicorn app.main:app --host 0.0.0.0\n    volumes:\n      - .:\/app\n    ports:\n      - 8000:8000\n\n  db:\n    image: postgres\n    volumes:\n      - postgres_data:\/var\/lib\/postgresql\/data\/\n    environment:\n      - POSTGRES_USER=username\n      - POSTGRES_PASSWORD=password\n      - POSTGRES_DB=fastapi\n    expose: \n      - 5432\n\nvolumes:\n  postgres_data:<\/code><\/pre>\n\n\n\n<p>Open your database.py file and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker\n\nSQLALCHEMY_DATABASE_URL = \"postgresql:\/\/username:password@backend-db-1\/fastapi\"\n\nengine = create_engine(SQLALCHEMY_DATABASE_URL)\nSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\n\nBase = declarative_base()\n\n\n<\/code><\/pre>\n\n\n\n<p>Open your models.py file and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sqlalchemy import Boolean, Column, ForeignKey, Integer, String\nfrom sqlalchemy.orm import relationship\n\nfrom .database import Base\n\n\nclass User(Base):\n    __tablename__ = \"users\"\n\n    id = Column(Integer, primary_key=True)\n    email = Column(String, unique=True, index=True)\n    hashed_password = Column(String)\n    is_active = Column(Boolean, default=True)\n\n    items = relationship(\"Item\", back_populates=\"owner\")\n\n\nclass Item(Base):\n    __tablename__ = \"items\"\n\n    id = Column(Integer, primary_key=True)\n    title = Column(String, index=True)\n    description = Column(String, index=True)\n    owner_id = Column(Integer, ForeignKey(\"users.id\"))\n\n    owner = relationship(\"User\", back_populates=\"items\")<\/code><\/pre>\n\n\n\n<p>Open your schemas.py file and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pydantic import BaseModel\n\n\nclass ItemBase(BaseModel):\n    title: str\n    description: str | None = None\n\n\nclass ItemCreate(ItemBase):\n    pass\n\n\nclass Item(ItemBase):\n    id: int\n    owner_id: int\n\n    class Config:\n        orm_mode = True\n\n\nclass UserBase(BaseModel):\n    email: str\n\n\nclass UserCreate(UserBase):\n    password: str\n\n\nclass User(UserBase):\n    id: int\n    is_active: bool\n    items: list&#91;Item] = &#91;]\n\n    class Config:\n        orm_mode = True<\/code><\/pre>\n\n\n\n<p>Open your crud.py file and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sqlalchemy.orm import Session\n\nfrom . import models, schemas\n\n\ndef get_user(db: Session, user_id: int):\n    return db.query(models.User).filter(models.User.id == user_id).first()\n\n\ndef get_user_by_email(db: Session, email: str):\n    return db.query(models.User).filter(models.User.email == email).first()\n\n\ndef get_users(db: Session, skip: int = 0, limit: int = 100):\n    return db.query(models.User).offset(skip).limit(limit).all()\n\n\ndef create_user(db: Session, user: schemas.UserCreate):\n    fake_hashed_password = user.password + \"notreallyhashed\"\n    db_user = models.User(email=user.email, hashed_password=fake_hashed_password)\n    db.add(db_user)\n    db.commit()\n    db.refresh(db_user)\n    return db_user\n\n\ndef get_items(db: Session, skip: int = 0, limit: int = 100):\n    return db.query(models.Item).offset(skip).limit(limit).all()\n\n\ndef create_user_item(db: Session, item: schemas.ItemCreate, user_id: int):\n    db_item = models.Item(**item.dict(), owner_id=user_id)\n    db.add(db_item)\n    db.commit()\n    db.refresh(db_item)\n    return db_item<\/code><\/pre>\n\n\n\n<p>Open your main.py and paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from fastapi import Depends, FastAPI, HTTPException\nfrom sqlalchemy.orm import Session\n\nfrom . import crud, models, schemas\nfrom .database import SessionLocal, engine\n\nmodels.Base.metadata.create_all(bind=engine)\n\napp = FastAPI()\n\n\n# Dependency\ndef get_db():\n    db = SessionLocal()\n    try:\n        yield db\n    finally:\n        db.close()\n\n\n@app.post(\"\/users\/\", response_model=schemas.User)\ndef create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):\n    db_user = crud.get_user_by_email(db, email=user.email)\n    if db_user:\n        raise HTTPException(status_code=400, detail=\"Email already registered\")\n    return crud.create_user(db=db, user=user)\n\n\n@app.get(\"\/users\/\", response_model=list&#91;schemas.User])\ndef read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):\n    users = crud.get_users(db, skip=skip, limit=limit)\n    return users\n\n\n@app.get(\"\/users\/{user_id}\", response_model=schemas.User)\ndef read_user(user_id: int, db: Session = Depends(get_db)):\n    db_user = crud.get_user(db, user_id=user_id)\n    if db_user is None:\n        raise HTTPException(status_code=404, detail=\"User not found\")\n    return db_user\n\n\n@app.post(\"\/users\/{user_id}\/items\/\", response_model=schemas.Item)\ndef create_item_for_user(\n    user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db)\n):\n    return crud.create_user_item(db=db, item=item, user_id=user_id)\n\n\n@app.get(\"\/items\/\", response_model=list&#91;schemas.Item])\ndef read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):\n    items = crud.get_items(db, skip=skip, limit=limit)\n    return items<\/code><\/pre>\n\n\n\n<p>Double check everything. You should be able to now build your fastapi image locally by running the following in PowerTools or iTerm or whatever you use:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker build -t fastapi .<\/code><\/pre>\n\n\n\n<p>Once that&#8217;s completed. Run your environment with following in PowerTools or iTerm (your choice of flavor):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker-compose up\n\n<\/code><\/pre>\n\n\n\n<p>You should now have your database and FastAPI running locally. Open up Docker Desktop and check them out or start learning some docker cli commands. Have fun!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First install Docker Desktop. Create a new repository on Bitbucket or wherever you want. Clone your repository to your computer. Navigate to your repository using PowerTools, iTerm &#8211; whichever one you like best and can run on your workstation. Next, open your code editor. Visual Studio Code is pretty good and free. If you&#8217;re in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":146,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,57,58,59],"tags":[65,61,63,64,62],"content_type":[],"class_list":["post-144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-container","category-docker","category-fastapi","category-python","tag-container","tag-docker","tag-fastapi","tag-postgresql","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Launch local docker Fast API with PostGres database - Scout Dill Pickle<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Launch local docker Fast API with PostGres database - Scout Dill Pickle\" \/>\n<meta property=\"og:description\" content=\"First install Docker Desktop. Create a new repository on Bitbucket or wherever you want. Clone your repository to your computer. Navigate to your repository using PowerTools, iTerm &#8211; whichever one you like best and can run on your workstation. Next, open your code editor. Visual Studio Code is pretty good and free. If you&#8217;re in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Scout Dill Pickle\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-17T03:42:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-17T16:50:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png\" \/>\n\t<meta property=\"og:image:width\" content=\"279\" \/>\n\t<meta property=\"og:image:height\" content=\"131\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scout\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scout\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/\"},\"author\":{\"name\":\"scout\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#\\\/schema\\\/person\\\/47fcfed41421e769831d8547b67e798d\"},\"headline\":\"Launch local docker Fast API with PostGres database\",\"datePublished\":\"2024-09-17T03:42:37+00:00\",\"dateModified\":\"2024-09-17T16:50:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/\"},\"wordCount\":245,\"publisher\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#\\\/schema\\\/person\\\/47fcfed41421e769831d8547b67e798d\"},\"image\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/docker.png\",\"keywords\":[\"container\",\"docker\",\"fastapi\",\"postgresql\",\"python\"],\"articleSection\":[\"container\",\"docker\",\"fastapi\",\"python\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/\",\"url\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/\",\"name\":\"Launch local docker Fast API with PostGres database - Scout Dill Pickle\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/docker.png\",\"datePublished\":\"2024-09-17T03:42:37+00:00\",\"dateModified\":\"2024-09-17T16:50:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/docker.png\",\"contentUrl\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/docker.png\",\"width\":279,\"height\":131,\"caption\":\"docker\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/2024\\\/09\\\/17\\\/launch-local-docker-fast-api-with-postgres-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/scoutdillpickle.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Launch local docker Fast API with PostGres database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#website\",\"url\":\"https:\\\/\\\/scoutdillpickle.com\\\/\",\"name\":\"Scout Dill Pickle\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#\\\/schema\\\/person\\\/47fcfed41421e769831d8547b67e798d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/scoutdillpickle.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/#\\\/schema\\\/person\\\/47fcfed41421e769831d8547b67e798d\",\"name\":\"scout\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/pexels-eva-bronzini-5503189.jpg\",\"url\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/pexels-eva-bronzini-5503189.jpg\",\"contentUrl\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/pexels-eva-bronzini-5503189.jpg\",\"width\":2000,\"height\":3000,\"caption\":\"scout\"},\"logo\":{\"@id\":\"https:\\\/\\\/scoutdillpickle.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/pexels-eva-bronzini-5503189.jpg\"},\"sameAs\":[\"https:\\\/\\\/scoutdillpickle.com\",\"https:\\\/\\\/instagram.com\\\/scoutdillpickle\",\"https:\\\/\\\/pin.it\\\/3STySMhlh\"],\"url\":\"https:\\\/\\\/scoutdillpickle.com\\\/index.php\\\/author\\\/scout\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Launch local docker Fast API with PostGres database - Scout Dill Pickle","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/","og_locale":"en_US","og_type":"article","og_title":"Launch local docker Fast API with PostGres database - Scout Dill Pickle","og_description":"First install Docker Desktop. Create a new repository on Bitbucket or wherever you want. Clone your repository to your computer. Navigate to your repository using PowerTools, iTerm &#8211; whichever one you like best and can run on your workstation. Next, open your code editor. Visual Studio Code is pretty good and free. If you&#8217;re in [&hellip;]","og_url":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/","og_site_name":"Scout Dill Pickle","article_published_time":"2024-09-17T03:42:37+00:00","article_modified_time":"2024-09-17T16:50:02+00:00","og_image":[{"width":279,"height":131,"url":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png","type":"image\/png"}],"author":"scout","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scout","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#article","isPartOf":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/"},"author":{"name":"scout","@id":"https:\/\/scoutdillpickle.com\/#\/schema\/person\/47fcfed41421e769831d8547b67e798d"},"headline":"Launch local docker Fast API with PostGres database","datePublished":"2024-09-17T03:42:37+00:00","dateModified":"2024-09-17T16:50:02+00:00","mainEntityOfPage":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/"},"wordCount":245,"publisher":{"@id":"https:\/\/scoutdillpickle.com\/#\/schema\/person\/47fcfed41421e769831d8547b67e798d"},"image":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#primaryimage"},"thumbnailUrl":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png","keywords":["container","docker","fastapi","postgresql","python"],"articleSection":["container","docker","fastapi","python"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/","url":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/","name":"Launch local docker Fast API with PostGres database - Scout Dill Pickle","isPartOf":{"@id":"https:\/\/scoutdillpickle.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#primaryimage"},"image":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#primaryimage"},"thumbnailUrl":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png","datePublished":"2024-09-17T03:42:37+00:00","dateModified":"2024-09-17T16:50:02+00:00","breadcrumb":{"@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#primaryimage","url":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png","contentUrl":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/09\/docker.png","width":279,"height":131,"caption":"docker"},{"@type":"BreadcrumbList","@id":"https:\/\/scoutdillpickle.com\/index.php\/2024\/09\/17\/launch-local-docker-fast-api-with-postgres-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/scoutdillpickle.com\/"},{"@type":"ListItem","position":2,"name":"Launch local docker Fast API with PostGres database"}]},{"@type":"WebSite","@id":"https:\/\/scoutdillpickle.com\/#website","url":"https:\/\/scoutdillpickle.com\/","name":"Scout Dill Pickle","description":"","publisher":{"@id":"https:\/\/scoutdillpickle.com\/#\/schema\/person\/47fcfed41421e769831d8547b67e798d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/scoutdillpickle.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/scoutdillpickle.com\/#\/schema\/person\/47fcfed41421e769831d8547b67e798d","name":"scout","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/04\/pexels-eva-bronzini-5503189.jpg","url":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/04\/pexels-eva-bronzini-5503189.jpg","contentUrl":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/04\/pexels-eva-bronzini-5503189.jpg","width":2000,"height":3000,"caption":"scout"},"logo":{"@id":"https:\/\/scoutdillpickle.com\/wp-content\/uploads\/2024\/04\/pexels-eva-bronzini-5503189.jpg"},"sameAs":["https:\/\/scoutdillpickle.com","https:\/\/instagram.com\/scoutdillpickle","https:\/\/pin.it\/3STySMhlh"],"url":"https:\/\/scoutdillpickle.com\/index.php\/author\/scout\/"}]}},"_links":{"self":[{"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":3,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/posts\/144\/revisions\/149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/media\/146"}],"wp:attachment":[{"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/tags?post=144"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/scoutdillpickle.com\/index.php\/wp-json\/wp\/v2\/content_type?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}