Skip to content

Commit

Permalink
Preparing for CodeBuild for dev deployment attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
gmerritt committed Feb 5, 2024
1 parent 18ebc9a commit 2047dab
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .ebextensions/00_ami.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ packages:
git: []
mod_ssl: []

commands:
01_postgres_activate:
command: sudo amazon-linux-extras enable postgresql14
02_postgres_install:
command: sudo yum install -y postgresql

option_settings:
aws:elasticbeanstalk:cloudwatch:logs:
Expand Down Expand Up @@ -43,6 +38,6 @@ files:
group: root
content: |
[/var/app/current/hartsfield.log]
log_group_name=`{"Fn::Join":["/", ["/aws/elasticbeanstalk", { "Ref":"AWSEBEnvironmentName" }, "var/app/current/damien.log"]]}`
log_group_name=`{"Fn::Join":["/", ["/aws/elasticbeanstalk", { "Ref":"AWSEBEnvironmentName" }, "var/app/current/hartsfield.log"]]}`
log_stream_name={instance_id}
file=/var/app/current/hartsfield.log*
4 changes: 4 additions & 0 deletions .platform/hooks/postdeploy/00_update_apache_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
sudo mv /tmp/hartsfield.conf /etc/httpd/conf.d/hartsfield.conf
sudo mv /tmp/ssl.conf /etc/httpd/conf.d/ssl.conf
sudo /bin/systemctl restart httpd.service
3 changes: 3 additions & 0 deletions .platform/hooks/postdeploy/01_start_awslogsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
sudo systemctl enable awslogsd.service
sudo systemctl restart awslogsd
5 changes: 5 additions & 0 deletions .platform/hooks/predeploy/00_download_local_configs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
PYTHONPATH='' aws s3 cp s3://hartsfield-deploy-configs/hartsfield/${EB_ENVIRONMENT}.py config/production-local.py
printf "\nEB_ENVIRONMENT = '${EB_ENVIRONMENT}'\n\n" >> config/production-local.py
chown webapp config/production-local.py
chmod 400 config/production-local.py
33 changes: 33 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 0.2

phases:
install:
runtime-versions:
nodejs: 21
python: 3.11
commands:
- node -v
- npm install
pre_build:
commands:
- echo "pre_build phase"
build:
commands:
- npm run build-vue
post_build:
commands:
- chmod 755 ./scripts/*.sh
- ./scripts/create-build-summary.sh
artifacts:
files:
- '.ebextensions/**/*'
- 'dist/**/*'
- 'requirements.txt'
- 'hartsfield/**/*'
- 'scripts/**/*'
- 'application.py'
- 'consoler.py'
- 'config/**/*'
- '.platform/**/*'
- 'Procfile'

2 comments on commit 2047dab

@gmerritt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this directly, whoops! Maybe should have done to my fork & PR'd...apologies....

@shaneknapp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making a feature fork and PR is almost always the right way to go. ;)

Please sign in to comment.