Skip to content

Commit

Permalink
transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBoatyMcBoatFace committed Aug 30, 2023
1 parent cfa4303 commit 11e02a5
Show file tree
Hide file tree
Showing 21 changed files with 693 additions and 21 deletions.
76 changes: 76 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# .editorconfig
# ------------------------------
# Editor Configuration
# ------------------------------

# Top-most EditorConfig file
root = true

# ------------------------------
# Global Settings
# ------------------------------

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# ------------------------------
# Language Specific Settings
# ------------------------------

# Python
[*.py]
charset = utf-8
indent_style = space
indent_size = 4
max_line_length = 79

# Rust
[*.rs]
indent_style = space
indent_size = 4

# R
[*.R]
indent_style = space
indent_size = 2

# JavaScript and CSS
[*.{js,css}]
brace_style = allman
indent_style = space
indent_size = 4

# HTML
[*.html]
indent_style = space
indent_size = 2

# SQL
[*.sql]
indent_style = space
indent_size = 2

# YAML
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# Dockerfile
[Dockerfile]
indent_style = space
indent_size = 2

# Makefile
[Makefile]
indent_style = tab

# Markdown
[*.md]
max_line_length = 120

# ------------------------------
# Additional Specific Settings
# ------------------------------
19 changes: 0 additions & 19 deletions .github/workflows/auto-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,3 @@ jobs:
name: "Release v${{ needs.versioning.outputs.version }}"
tag: "v${{ needs.versioning.outputs.version }}"
token: ${{ secrets.BOT_TOKEN }}

# configure-sentry:
# needs: create-release
# name: Configure Sentry
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Create Sentry release
# uses: getsentry/action-release@v1
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# SENTRY_URL: ${{ secrets.SENTRY_URL }}
# with:
# environment: production
20 changes: 18 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,29 @@ ENV POSTGRES_DB gova11y
ENV POSTGRES_USER deva11y
ENV POSTGRES_PASSWORD SuperSecura11y
ENV POSTGRES_PORT 5432
ENV TZ America/New_York
ENV TZ America/New_York

HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U deva11y -h localhost
STOPSIGNAL SIGINT
EXPOSE $POSTGRES_PORT

# ENTRYPOINT ["scripts/startup.sh"]
# Copy the migration script
COPY scripts/* scripts/

# Copy migrations
COPY migrations/* /migrations

# Make the scripts executable
RUN chmod -R +x scripts/
RUN chmod -R +x migrations/

# Set the new startup script as the entrypoint
COPY scripts/startup.sh /docker-entrypoint-initdb.d/startup.sh
RUN chmod +x /docker-entrypoint-initdb.d/startup.sh

ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE $POSTGRES_PORT
# Copy migrations
#COPY migrations/* /migrations

Expand Down
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# docker-compose.yml

version: "3"
services:
server:
image: postgrest/postgrest
hostname: postgrest
ports:
- "3000:3000"
environment:
PGRST_DB_URI: postgres://app_user:password@db:5432/app_db
PGRST_OPENAPI_SERVER_PROXY_URI: http://127.0.0.1:3000
depends_on:
- postgres
deploy:
restart_policy:
condition: always
delay: 10s
max_attempts: 5
window: 120s
networks:
- postgres
- gova11y

postgres:
image: gova11y/postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_DB: app_db
POSTGRES_USER: app_user
POSTGRES_PASSWORD: password
deploy:
restart_policy:
condition: always
delay: 10s
max_attempts: 5
window: 120s
networks:
- postgres

swagger:
image: swaggerapi/swagger-ui
ports:
- "8080:8080"
# expose:
- "8080"
# environment:
# API_URL: http://localhost:3000/
# Uncomment this if you want to persist the data.
# volumes:
# - "./pgdata:/var/lib/postgresql/data"
9 changes: 9 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Postgres Docs

## Migrations

This postgres container

### Scripts

These are the scripts which
190 changes: 190 additions & 0 deletions docs/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# Postgres Extensions

## PostGIS: Geo queries
PostGIS is a Postgres extension that allows you to interact with Geo data within Postgres. You can sort your data by geographic location, get data within certain geographic boundaries, and do much more with it.


[Official Docs](https://postgis.net/)

## pgRouting: Geospatial Routing
Extends the PostGIS functionality to provide geospatial routing functionality.


[Official Docs](https://pgrouting.org/)

## pgTAP
Database extension for writing TAP (Test Anything Protocol) compliant unit tests in psql scripts.


[Official Docs](https://pgtap.org/)

## pg_cron: Job Scheduling
Job scheduler for PostgreSQL, allowing scheduled tasks to be run at specific times.


[Official Docs](https://github.com/citusdata/pg_cron)

## PGAudit: Postgres Auditing
PGAudit is a PostgreSQL extension for logging session and object auditing over the standard PostgreSQL logging utility.

PGAudit grants fine grain control over which statements and objects are emitted to logs.


[Official Docs](https://www.pgaudit.org/)

## pgjwt: JSON Web Tokens
Implementation of JSON Web Tokens for PostgreSQL.


[Official Docs](https://github.com/michelp/pgjwt)

## pgsql-http
Provides the ability to make HTTP and HTTPS requests from PostgreSQL server programming functions.


[Official Docs]()

## plpgsql_check
Extension to check function validity in PL/pgSQL.


[Official Docs]()

## pg_safeupdate: Required Where Clauses
pg-safeupdate is a PostgreSQL extension designed to prevent users from accidentally updating or deleting too many records in a single statement by requiring a "where" clause in all update and delete statements.

The pg-safeupdate extension is a useful tool for protecting data integrity and preventing accidental data loss. Without it, a user could accidentally execute an update or delete statement that affects all records in a table. With pg-safeupdate, users are required to be more deliberate in their update and delete statements, which reduces the risk of significant error.


[Official Docs](https://github.com/eradman/pg-safeupdate)

## TimescaleDB: Time-Series data
An open-source time-series SQL database optimized for fast ingest and complex queries. It provides a scalable, high-performance solution for storing and querying time-series data on top of a standard PostgreSQL database.

TimescaleDB uses a time-series-aware storage model and indexing techniques to improve performance of PostgreSQL in working with time-series data. The extension divides data into chunks based on time intervals, allowing it to scale efficiently, especially for large data sets. The data is then compressed, optimized for write-heavy workloads, and partitioned for parallel processing. timescaledb also includes a set of functions, operators, and indexes that work with time-series data to reduce query times, and make data easier to work with.




[Official Docs](https://docs.timescale.com/use-timescale/latest/)

## wal2json
Output plugin for logical decoding to output replication changes as JSON.


[Official Docs]()

## PL/Java
Storing procedures and triggers written in Java.


[Official Docs]()

## PL/v8
Trusted JavaScript language extension for PostgreSQL.


[Official Docs]()

## pg_net
Provides network-related functions and data types.


[Official Docs]()

## RUM
Provides support for RUM (Rapidly Updatable Materialized views) index access method.


[Official Docs](https://github.com/postgrespro/rum)

## pg_hashids
Encode and decode big integers to and from short strings.


[Official Docs]()

## libsodium
Library for encryption, decryption, signatures, etc.


[Official Docs]()

## pgsodium
A PostgreSQL extension that adds crypto functions from libsodium.


[Official Docs]()

## pg-graphql
A GraphQL extension for PostgreSQL.


[Official Docs]()

## pg_stat_monitor
An advanced query monitoring extension.


[Official Docs]()

## pg_jsonschema
Validate JSON data against a schema.


[Official Docs]()

## Vault
A secure vault for storing and retrieving secrets within PostgreSQL.


[Official Docs]()

## Groonga
An open-source full-text search engine and column store.


[Official Docs]()

## pgroonga
A PostgreSQL extension for using Groonga as an index.


[Official Docs]()

## HypoPG
A PostgreSQL extension for creating hypothetical indexes.


[Official Docs]()

## pg_repack
Reorganizes tables in PostgreSQL databases with minimal locks.


[Official Docs]()

## pgvector
Vector similarities in PostgreSQL.


[Official Docs]()

## pg_tle
Two-Line Element set data type for PostgreSQL.


[Official Docs]()

## supautils
A collection of functions and tweaks to ease PostgreSQL administration.


[Official Docs]()

## wal-g
Archiving and restoration for PostgreSQL.


[Official Docs]()

Loading

0 comments on commit 11e02a5

Please sign in to comment.