@@ -90,20 +90,25 @@ make vm-ssh # Connect to VM
9090make infra-destroy
9191```
9292
93- ### Cloud Deployment (Coming Soon)
93+ ### Cloud Deployment
9494
9595``` bash
96- # Setup Hetzner credentials
97- export HCLOUD_TOKEN=" your-hetzner-cloud-token"
98- export HDNS_TOKEN=" your-hetzner-dns-token"
96+ # Configure Hetzner provider with your API tokens first
97+ vim infrastructure/config/providers/hetzner.env
98+
99+ # Generate staging environment configuration
100+ make infra-config-staging PROVIDER=hetzner
101+
102+ # Generate production environment configuration
103+ make infra-config-production PROVIDER=hetzner
99104
100105# Deploy staging environment
101- make infra-apply ENVIRONMENT_TYPE =staging ENVIRONMENT_FILE=staging-hetzner
102- make app-deploy ENVIRONMENT_TYPE =staging ENVIRONMENT_FILE=staging-hetzner
106+ make infra-apply ENVIRONMENT =staging ENVIRONMENT_FILE=staging-hetzner
107+ make app-deploy ENVIRONMENT =staging ENVIRONMENT_FILE=staging-hetzner
103108
104109# Deploy production environment
105- make infra-apply ENVIRONMENT_TYPE =production ENVIRONMENT_FILE=production-hetzner
106- make app-deploy ENVIRONMENT_TYPE =production ENVIRONMENT_FILE=production-hetzner
110+ make infra-apply ENVIRONMENT =production ENVIRONMENT_FILE=production-hetzner
111+ make app-deploy ENVIRONMENT =production ENVIRONMENT_FILE=production-hetzner
107112```
108113
109114---
@@ -839,6 +844,56 @@ TRACKER_ADMIN_TOKEN=MyAccessToken
839844
840845### Production Environment Configuration
841846
847+ #### Two-File Architecture Overview
848+
849+ The deployment system uses a ** two-file architecture** for maximum security and flexibility:
850+
851+ 1 . ** Environment Files** : Environment-specific settings (staging-hetzner.env, production-hetzner.env)
852+ 2 . ** Provider Files** : API tokens and provider configuration (hetzner.env)
853+
854+ ** Benefits** :
855+
856+ - ** Security** : API tokens stored separately from environment settings
857+ - ** Flexibility** : Same provider configuration works across multiple environments
858+ - ** Deployment** : Scripts load both files independently during operations
859+
860+ ** File Locations** :
861+
862+ - ** Environment Files** : ` infrastructure/config/environments/ `
863+ - ** Provider Files** : ` infrastructure/config/providers/ `
864+
865+ #### Configure Hetzner Provider (Required)
866+
867+ Before creating environment configurations, you must configure the Hetzner provider with your API tokens:
868+
869+ ``` bash
870+ # Edit the Hetzner provider configuration
871+ vim infrastructure/config/providers/hetzner.env
872+ ```
873+
874+ ** Required Changes** :
875+
876+ 1 . Replace ` HETZNER_API_TOKEN ` with your Hetzner Cloud API token
877+ 2 . Replace ` HETZNER_DNS_API_TOKEN ` with your Hetzner DNS API token
878+
879+ ** Example Configuration** :
880+
881+ ``` bash
882+ # === HETZNER CLOUD AUTHENTICATION ===
883+ HETZNER_API_TOKEN=your-actual-cloud-api-token-here
884+
885+ # === HETZNER DNS AUTHENTICATION ===
886+ HETZNER_DNS_API_TOKEN=your-actual-dns-api-token-here
887+
888+ # === HETZNER CLOUD SETTINGS ===
889+ HETZNER_SERVER_TYPE=cpx31 # 4 vCPU, 8GB RAM, 160GB SSD
890+ HETZNER_LOCATION=fsn1 # Falkenstein, Germany
891+ HETZNER_IMAGE=ubuntu-24.04
892+ ```
893+
894+ ** ⚠️ Security Note** : The provider file contains sensitive API tokens. Never commit real tokens
895+ to version control.
896+
842897#### Generate Secure Secrets
843898
844899Production deployment requires secure random secrets:
0 commit comments