I'm on a Windows 11 machine. You can use open-fly-env.ps1 to open the various windows. .env contains secrets
Currently I have a Docker / Portainer instance inside Proxmox on an enterprise-grade laptop. It is unaccessible from the internet. I leave it on 24/7.
Laptop:
- bin/deploy-to-docker-host.sh (uses docker-compose)
Proxmox console:
- Enter docker-host: pct enter 100
- Enter docker container: docker exec -it summary_bot_opensource-summary-bot-1 /bin/bash
These go in your .env file
- DISCORD_TOKEN
- OPENAI_API_KEY
- DOCKER_HOST
This is something I don't do at present.
These commands can be opened in seperate command shells by running ``bin\open-fly-env.ps1`
fly apps create summary-bot-1
fly deploy --build-arg INSTALL_DEV=true
fly ext sentry createRun the machine from e.g. https://fly.io/apps/summary-bot-aparine/machines/48eddeef724d08
.\fly-set-secrets.ps1
fly secrets set DEBUGPY_ENABLE=trueBonus: Secure fly proxy to debug On your local machine:
fly proxy 5678:5678Then attach your IDE’s remote debugger to localhost:5678.
- build.args.INSTALL_DEV = "false": Tells Fly's remote builder not to install dev dependencies unless overridden during deploy.
- env.DEBUGPY_ENABLE = "false": Prevents debugpy from starting by default.
- env.DEBUGPY_WAIT = will wait for the debugger to connect (hint: don't forget to proxy it)
The second [[services]] block exposes port 5678 internally, not publicly, so you can attach via fly proxy.
To deploy with debugging enabled:
fly deploy --build-arg INSTALL_DEV=true \
--env DEBUGPY_ENABLE=true \
--env ENV=development