-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from kennedy-steve/development
release-v1.0-alpha
- Loading branch information
Showing
48 changed files
with
2,945 additions
and
1,233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Deploy to Elastic Beanstalk Production Environment | ||
on: | ||
push: | ||
branches: | ||
- production | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
# Service containers to run with `container-job` | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
image: postgres | ||
# Provide the password for postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps TCP port 5432 on service container to the host | ||
- 5432:5432 | ||
env: | ||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/skylink-if | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
- run: npm ci | ||
# run the migration in the test database | ||
- run: npm run db:push | ||
|
||
deployment: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Generate deployment package | ||
run: zip -r deploy.zip . -x '*.git*' | ||
|
||
- name: Setup npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run production migration | ||
run: npm run migrate:deploy | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
|
||
|
||
- name: Deploy to Elastic Beanstalk Production Environment | ||
uses: einaregilsson/beanstalk-deploy@v20 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: ${{ secrets.ELASTIC_BEANSTALK_APPLICATION_NAME }} | ||
environment_name: ${{ secrets.ELASTIC_BEANSTALK_ENVIRONMENT_NAME }} | ||
version_label: skylink-if-production-${{ github.run_number }} | ||
region: us-east-1 | ||
deployment_package: deploy.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Deploy to Elastic Beanstalk Staging Environment | ||
on: | ||
push: | ||
branches: | ||
- development | ||
- elastic-beanstalk-config | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
# Service containers to run with `container-job` | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
image: postgres | ||
# Provide the password for postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps TCP port 5432 on service container to the host | ||
- 5432:5432 | ||
env: | ||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/skylink-if | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
- run: npm ci | ||
# run the migration in the test database | ||
- run: npm run db:push | ||
|
||
deployment: | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
steps: | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Generate deployment package | ||
run: zip -r deploy.zip . -x '*.git*' | ||
|
||
- name: Setup npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run staging migration | ||
run: npm run migrate:deploy | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
|
||
|
||
- name: Deploy to Elastic Beanstalk Staging Environment | ||
uses: einaregilsson/beanstalk-deploy@v20 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: ${{ secrets.ELASTIC_BEANSTALK_APPLICATION_NAME }} | ||
environment_name: ${{ secrets.ELASTIC_BEANSTALK_ENVIRONMENT_NAME }} | ||
version_label: skylink-if-staging-${{ github.run_number }} | ||
region: us-east-1 | ||
deployment_package: deploy.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Test Skylink-IF | ||
on: | ||
pull_request: | ||
branches: | ||
- production | ||
- development | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
# Service containers to run with `container-job` | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
image: postgres | ||
# Provide the password for postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps TCP port 5432 on service container to the host | ||
- 5432:5432 | ||
env: | ||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/skylink-if | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
- run: npm ci | ||
# run the migration in the test database | ||
- run: npm run db:push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:15 | ||
FROM node:16 | ||
|
||
# Create app directory | ||
WORKDIR /app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.