I'm working on a FastAPI application that's packaged in Docker and hosted in a private GitHub repo. Currently, I'm using pip for dependencies, but I'm also open to using uv if needed. The challenge I'm facing is that I need to deploy this application on a Windows Server 2012 R2 running IIS, and I've been given RDP access for this.
I'm aware that Windows Server 2012 might not support Docker; however, I've been told I can either run my application using its built-in server or install my own webserver, without having to go through IIS.
I want to set up a CI/CD pipeline so that every time I push to my GitHub repo, the app gets automatically deployed. I've never used Windows Server before, and while I considered using Windows Task Scheduler like a cron job to automate a 'git pull' command followed by a batch script to restart the FastAPI app, I'm wondering if there are better deployment solutions for Windows. Most CI/CD tools seem catered to Linux environments, so I'm curious about my options here.
The CEO suggested I could manually transfer files over RDP if needed, but I prefer having a proper pipeline to avoid issues with the app going down if someone closes the command line. Also, would it make sense to create a FastAPI service to ensure that it remains running? If things get too complicated, I might just opt for a Linux VPS, but I'd like to figure this out on the Windows server first if possible.
1 Answer
You might want to consider setting up a GitHub Actions self-hosted runner on your Windows server. It can handle CI/CD tasks without needing SSH access, which is perfect since you have RDP. Just set up your workflow to deploy right from there!
Also, for IIS, pointing it to your FastAPI app will be straightforward; a few clicks here and there to configure it properly.

That sounds like a solid plan! Using GitHub Actions could simplify your deployment process a lot.