Skip to content

Commit

Permalink
Remove all postgres code
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Jan 5, 2025
1 parent 218d251 commit 32dfa57
Show file tree
Hide file tree
Showing 67 changed files with 29 additions and 4,520 deletions.
6 changes: 0 additions & 6 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
PGHOST=localhost
PGPORT=31744
PGDATABASE=postgres
PGUSER=postgresadmin
PGPASSWORD=dsjdsFwqklqwkbj
JWT_SECRET=dummysecret
PGSSL=false
VHOST=api.destinyitemmanager.com
25 changes: 0 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,6 @@ jobs:
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{secrets.K8S_CLUSTER}}

- name: Add IP address to trusted source (managed database)
uses: GarreauArthur/manage-digital-ocean-managed-database-trusted-sources-gh-action@main
with:
action: 'add'
database_id: ${{ secrets.DATABASE_ID }}
digitalocean_token: ${{ secrets.DIGITALOCEAN_TOKEN }}

- name: Run DB migrations
run: cd api && npx db-migrate up -e prod
env:
DATABASE_USER: ${{ secrets.DATABASE_USER }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
DATABASE_PORT: ${{ secrets.DATABASE_PORT }}

- name: Remove IP address to trusted source (managed database)
if: always()
continue-on-error: true
uses: GarreauArthur/manage-digital-ocean-managed-database-trusted-sources-gh-action@main
with:
action: 'remove'
database_id: ${{ secrets.DATABASE_ID }}
digitalocean_token: ${{ secrets.DIGITALOCEAN_TOKEN }}

- name: Build and deploy
run: pnpm run deploy

Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ jobs:
runs-on: ubuntu-latest
environment: 'test'

services:
postgres:
# Docker Hub image
image: nat212/postgres-cron
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: travis_ci_test
POSTGRES_CRON_DB: travis_ci_test
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4

Expand All @@ -42,12 +23,6 @@ jobs:
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline

- name: Migrate Test DB
run: |
pushd api
npx db-migrate up -e test
popd
- run: cp build/.env.travis .env

- name: Build API
Expand Down
52 changes: 0 additions & 52 deletions api/db/apps-queries.test.ts

This file was deleted.

42 changes: 0 additions & 42 deletions api/db/apps-queries.ts

This file was deleted.

96 changes: 0 additions & 96 deletions api/db/index.test.ts

This file was deleted.

75 changes: 0 additions & 75 deletions api/db/index.ts

This file was deleted.

Loading

0 comments on commit 32dfa57

Please sign in to comment.