Skip to content

Commit

Permalink
Backup Azure config
Browse files Browse the repository at this point in the history
  • Loading branch information
besser435 committed Jan 6, 2024
1 parent 4cd8dae commit 789dc57
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
6 changes: 6 additions & 0 deletions old_azure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# What is this?
This website used to be hosted on Azure App Service (Linux B1).

This site isn't that important, so I don't feel like spending $13 a month on cloud fees when I can host it myself.

This directory is simply a backup of all of that config stuff incase I want to go back or whatnot.
Binary file added old_azure/dns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions old_azure/environment_vars.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AUTHORIZED_API_KEY
MISC_API=/get_misc
PLAYER_API=/get_all_users
Binary file added old_azure/git_repo.zip
Binary file not shown.
67 changes: 67 additions & 0 deletions old_azure/main_usa-industries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions

name: Build and deploy Python app to Azure Web App - USA-Industries

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.11'

- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: pip install -r requirements.txt

# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
- name: Zip artifact for deployment
run: zip release.zip ./* -r

- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v3
with:
name: python-app
path: |
release.zip
!venv/
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: python-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'USA-Industries'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_249B1A843BEF412285FA0191FFF74D52 }}
1 change: 1 addition & 0 deletions old_azure/startup_command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gunicorn --bind=0.0.0.0 --timeout 600 --chdir website app:app
46 changes: 46 additions & 0 deletions old_azure/usa-industries.net.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
;;
;; Domain: usa-industries.net.
;; Exported: 2024-01-06 10:36:25
;;
;; This file is intended for use for informational and archival
;; purposes ONLY and MUST be edited before use on a production
;; DNS server. In particular, you must:
;; -- update the SOA record with the correct authoritative name server
;; -- update the SOA record with the contact e-mail address information
;; -- update the NS record(s) with the authoritative name servers for this domain.
;;
;; For further information, please consult the BIND documentation
;; located on the following website:
;;
;; http://www.isc.org/
;;
;; And RFC 1035:
;;
;; http://www.ietf.org/rfc/rfc1035.txt
;;
;; Please note that we do NOT offer technical support for any use
;; of this zone data, the BIND name server, or any other third-party
;; DNS software.
;;
;; Use at your own risk.
;; SOA Record
usa-industries.net 3600 IN SOA ines.ns.cloudflare.com. dns.cloudflare.com. 2045620398 10000 2400 604800 3600

;; NS Records
usa-industries.net. 86400 IN NS ines.ns.cloudflare.com.
usa-industries.net. 86400 IN NS malcolm.ns.cloudflare.com.

;; A Records
teawgay.usa-industries.net. 1 IN A 198.244.177.74
usa-industries.net. 1 IN A 40.119.12.81 ; PROD for usa-industries.net

;; CNAME Records
test.usa-industries.net. 1 IN CNAME 5e59a8a4-ff83-4fca-802a-d660c6c6c3ef.cfargotunnel.com.
www.usa-industries.net. 1 IN CNAME usa-industries.azurewebsites.net. ; PROD for www.usa-industries.net

;; SRV Records
_minecraft._tcp.teawgay.usa-industries.net. 1 IN SRV 5 0 25726 teawgay.usa-industries.net.

;; TXT Records
asuid.usa-industries.net. 1 IN TXT "4EB52B888DE52BC979792C59870AEB4CA1EBE2AF05D9EAC3D804B0025DD1D351" ; PROD for usa-industries.net
asuid.www.usa-industries.net. 1 IN TXT "4EB52B888DE52BC979792C59870AEB4CA1EBE2AF05D9EAC3D804B0025DD1D351" ; PROD for www.usa-industries.net

0 comments on commit 789dc57

Please sign in to comment.