---
title: "Deploy fastapi-mysql"
description: "FastApi template with MySQL database and poetry"
category: "Other"
url: https://railway.com/deploy/WLyaUV
---

# Deploy fastapi-mysql

FastApi template with MySQL database and poetry

**[Deploy fastapi-mysql on Railway](https://railway.com/template/WLyaUV)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/WLyaUV/manifest.json

- **Creator:** Randall Schwemmer's Projects
- **Category:** Other
- **Total deploys:** 91

## Template content

### mysql-fastapi

- **Source:** https://github.com/rschwemmer/mysql-fastapi
- **Public domain:** Yes

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:9
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0`

## Documentation

<b>Getting Started:</b>
<ol>
<li>Setup Poetry</li>
- Create the poetry environment
```poetry env use 3.11```

<li>Start the poetry shell</li>
- ```poetry shell```

<li>Install dependencies:</li>
- ```poetry install```

<li>Create a .env file and input environment variables.</li>

<li>Initialize database tables:</li>
- ```alembic upgrade head```

<li>Start the application in development mode:</li>
- ```poetry run dev```

<li>Test the application by making requests to endpoints.</li>
</ol>

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/WLyaUV
