Skip to content

Commit

Permalink
set up production deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Nov 7, 2023
1 parent 170c246 commit 63c9924
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ hooks:
runas: root

branch_config:
ec2_deploy:
master:
deploymentGroupName: staging

deploy:
ec2_deploy:
deploymentGroupName: production
Binary file modified configs/.env.staging.gpg
Binary file not shown.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions configs/staging-config.conf

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

# Make sure the deployment group specific variables are available to this
# script.
source /home/datamade/asset-dashboard/configs/$DEPLOYMENT_GROUP_NAME-config.conf
source /home/datamade/asset-dashboard/configs/.env.$DEPLOYMENT_GROUP_NAME

# Set some useful variables
DEPLOYMENT_NAME="$APP_NAME-$DEPLOYMENT_ID"
Expand Down Expand Up @@ -71,4 +71,4 @@ fi
# Install Jinja into the virtual environment and run the render_configs.py
# script.
$VENV_DIR/bin/pip install Jinja2>=2.10
$VENV_DIR/bin/python $PROJECT_DIR/scripts/render_configs.py $DEPLOYMENT_ID $DEPLOYMENT_GROUP_NAME $DOMAIN $APP_NAME
$VENV_DIR/bin/python $PROJECT_DIR/scripts/render_configs.py $DEPLOYMENT_ID $DOMAIN $APP_NAME
2 changes: 1 addition & 1 deletion scripts/app_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

# Make sure the deployment group specific variables are available to this
# script.
source ${BASH_SOURCE%/*}/../configs/$DEPLOYMENT_GROUP_NAME-config.conf
source ${BASH_SOURCE%/*}/../.env

# Set some useful variables
PROJECT_DIR="/home/datamade/$APP_NAME-$DEPLOYMENT_ID"
Expand Down
10 changes: 5 additions & 5 deletions scripts/render_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

from jinja2 import Template

deployment_id, deployment_group, domain, app_name = sys.argv[1:]
deployment_id, domain, app_name = sys.argv[1:]

nginx_template_path = '/home/datamade/{0}-{1}/configs/{0}-{2}.conf.nginx'.format(
app_name, deployment_id, deployment_group)
nginx_template_path = '/home/datamade/{0}-{1}/configs/{0}.conf.nginx'.format(
app_name, deployment_id)
nginx_outpath = '/etc/nginx/conf.d/{}.conf'.format(app_name)
supervisor_template_path = '/home/datamade/{0}-{1}/configs/{0}-{2}.conf.supervisor'.format(
app_name, deployment_id, deployment_group)
supervisor_template_path = '/home/datamade/{0}-{1}/configs/{0}.conf.supervisor'.format(
app_name, deployment_id)
supervisor_outpath = '/etc/supervisor/conf.d/{}.conf'.format(app_name)

with open(nginx_template_path) as f:
Expand Down

0 comments on commit 63c9924

Please sign in to comment.