Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 39 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Python
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info/
dist/
build/
.env
.venv
venv/
*.log

# Git
.git/
.gitignore

# SQL dumps
*.sql
Backend/2025_dump.sql

# Node modules (we only need the build folder)
Frontend/ava-02/node_modules/
Frontend/ava-02/src/
Frontend/ava-02/public/

# IDE
.vscode/
.idea/
*.swp
*.swo
.DS_Store

# EB files
.elasticbeanstalk/
*.zip
17 changes: 17 additions & 0 deletions .ebextensions/00_install_certbot.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .ebextensions/00_install_certbot.config
container_commands:
00_install_deps:
command: "sudo dnf install python3 augeas-libs"
ignoreErrors: true
10_create_venv:
command: "sudo python3 -m venv /opt/certbot"
ignoreErrors: true
20_update_pip:
command: "sudo /opt/certbot/bin/pip install --upgrade pip"
ignoreErrors: true
30_install_certbot:
command: "sudo /opt/certbot/bin/pip install certbot certbot-nginx"
ignoreErrors: true
40_link_certbot:
command: "sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot"
ignoreErrors: true
4 changes: 4 additions & 0 deletions .ebextensions/01_app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
option_settings:
aws:elasticbeanstalk:application:environment:
PYTHONUNBUFFERED: "1"
PORT: "8000"
13 changes: 13 additions & 0 deletions .ebextensions/02_certbot_renewal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# .ebextensions/02_certbot_renewal.config
files:
"/etc/cron.d/certbot_renew":
mode: "000644"
owner: root
group: root
content: |
# Run certbot renewal twice daily at random minutes (recommended by Let's Encrypt)
23 2,14 * * * root /usr/bin/certbot renew --quiet --deploy-hook "systemctl reload nginx"

commands:
01_remove_old_cron:
command: "rm -f /etc/cron.d/certbot_renew.bak"
10 changes: 10 additions & 0 deletions .ebextensions/10_open_https_port.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# .ebextensions/10_open_https_port.config
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
FromPort: 443
CidrIp: 0.0.0.0/0
2 changes: 2 additions & 0 deletions .elasticbeanstalk/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global:
profile: eb-cli
4 changes: 3 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ Frontend/ava-02/npm-debug.log*
Frontend/ava-02/yarn-debug.log*
Frontend/ava-02/yarn-error.log*

Backend/secrets.py
Backend/secrets.py
Backend/configDB.py
Backend/__pycache__/*
3 changes: 3 additions & 0 deletions .platform/hooks/postdeploy/00_get_certificate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
# .platform/hooks/postdeploy/00_get_certificate.sh
sudo certbot -n -d ava-02.us-east-1.elasticbeanstalk.com --nginx --agree-tos --email tobinw@byu.edu
18 changes: 18 additions & 0 deletions Backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info
dist
build
.env
.venv
venv/
*.log
.git
.gitignore
*.sql
2025_dump.sql
Loading