From 527ea5044ddf55f648dc4ff31bf91ff10cb7166f Mon Sep 17 00:00:00 2001 From: Vikram Rangnekar Date: Fri, 27 Sep 2019 02:44:40 -0400 Subject: [PATCH] Remove the 'hello' test app folder --- hello/config/dev.yml | 152 --------------------------- hello/config/migrations/100_init.sql | 21 ---- hello/config/prod.yml | 144 ------------------------- hello/docker-compose.yml | 17 --- hello/seed.js | 17 --- 5 files changed, 351 deletions(-) delete mode 100644 hello/config/dev.yml delete mode 100644 hello/config/migrations/100_init.sql delete mode 100644 hello/config/prod.yml delete mode 100644 hello/docker-compose.yml delete mode 100644 hello/seed.js diff --git a/hello/config/dev.yml b/hello/config/dev.yml deleted file mode 100644 index c4541d7..0000000 --- a/hello/config/dev.yml +++ /dev/null @@ -1,152 +0,0 @@ -app_name: "Hello Development" -host_port: 0.0.0.0:8080 -web_ui: true - -# debug, info, warn, error, fatal, panic -log_level: "debug" - -# Disable this in development to get a list of -# queries used. When enabled super graph -# will only allow queries from this list -# List saved to ./config/allow.list -use_allow_list: false - -# Throw a 401 on auth failure for queries that need auth -# valid values: always, per_query, never -auth_fail_block: never - -# Latency tracing for database queries and remote joins -# the resulting latency information is returned with the -# response -enable_tracing: true - -# Watch the config folder and reload Super Graph -# with the new configs when a change is detected -reload_on_config_change: true - -# File that points to the database seeding script -# seed_file: seed.js - -# Path pointing to where the migrations can be found -migrations_path: ./config/migrations - -# Postgres related environment Variables -# SG_DATABASE_HOST -# SG_DATABASE_PORT -# SG_DATABASE_USER -# SG_DATABASE_PASSWORD - -# Auth related environment Variables -# SG_AUTH_RAILS_COOKIE_SECRET_KEY_BASE -# SG_AUTH_RAILS_REDIS_URL -# SG_AUTH_RAILS_REDIS_PASSWORD -# SG_AUTH_JWT_PUBLIC_KEY_FILE - -# inflections: -# person: people -# sheep: sheep - -auth: - # Can be 'rails' or 'jwt' - type: rails - cookie: _app_session - - # Comment this out if you want to disable setting - # the user_id via a header. Good for testing - header: X-User-ID - - rails: - # Rails version this is used for reading the - # various cookies formats. - version: 5.2 - - # Found in 'Rails.application.config.secret_key_base' - secret_key_base: 0a248500a64c01184edb4d7ad3a805488f8097ac761b76aaa6c17c01dcb7af03a2f18ba61b2868134b9c7b79a122bc0dadff4367414a2d173297bfea92be5566 - - # Remote cookie store. (memcache or redis) - # url: redis://redis:6379 - # password: "" - # max_idle: 80 - # max_active: 12000 - - # In most cases you don't need these - # salt: "encrypted cookie" - # sign_salt: "signed encrypted cookie" - # auth_salt: "authenticated encrypted cookie" - - # jwt: - # provider: auth0 - # secret: abc335bfcfdb04e50db5bb0a4d67ab9 - # public_key_file: /secrets/public_key.pem - # public_key_type: ecdsa #rsa - -database: - type: postgres - host: db - port: 5432 - dbname: hello_database - user: postgres - password: '' - - #schema: "public" - #pool_size: 10 - #max_retries: 0 - #log_level: "debug" - - # Define variables here that you want to use in filters - # sub-queries must be wrapped in () - variables: - account_id: "(select account_id from users where id = $user_id)" - - # Define defaults to for the field key and values below - defaults: - # filter: ["{ user_id: { eq: $user_id } }"] - - # Field and table names that you wish to block - blocklist: - - ar_internal_metadata - - schema_migrations - - secret - - password - - encrypted - - token - - tables: - - name: users - # This filter will overwrite defaults.filter - # filter: ["{ id: { eq: $user_id } }"] - - # - name: products - # # Multiple filters are AND'd together - # filter: [ - # "{ price: { gt: 0 } }", - # "{ price: { lt: 8 } }" - # ] - - - name: customers - # No filter is used for this field not - # even defaults.filter - filter: none - - remotes: - - name: payments - id: stripe_id - url: http://rails_app:3000/stripe/$id - path: data - # debug: true - pass_headers: - - cookie - set_headers: - - name: Host - value: 0.0.0.0 - # - name: Authorization - # value: Bearer - - - # You can create new fields that have a - # real db table backing them - name: me - table: users - filter: ["{ id: { eq: $user_id } }"] - - # - name: posts - # filter: ["{ account_id: { _eq: $account_id } }"] \ No newline at end of file diff --git a/hello/config/migrations/100_init.sql b/hello/config/migrations/100_init.sql deleted file mode 100644 index c06788d..0000000 --- a/hello/config/migrations/100_init.sql +++ /dev/null @@ -1,21 +0,0 @@ --- Write your migrate up statements here - -CREATE DATABASE hello_database - --- CREATE TABLE public.users ( --- id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, --- full_name text --- email text UNIQUE NOT NULL CHECK (length(email) < 255), --- encrypted_password text, --- created_at timestamptz NOT NULL NOT NULL DEFAULT NOW(), --- updated_at timestamptz NOT NULL NOT NULL DEFAULT NOW() --- ); - ----- create above / drop below ---- - --- Write your migrate down statements here. If this migration is irreversible --- Then delete the separator line above. - --- DROP TABLE public.users - -DROP DATABASE IF EXISTS hello_database diff --git a/hello/config/prod.yml b/hello/config/prod.yml deleted file mode 100644 index 2c39569..0000000 --- a/hello/config/prod.yml +++ /dev/null @@ -1,144 +0,0 @@ -app_name: "Hello Production" -host_port: 0.0.0.0:8080 -web_ui: false - -# debug, info, warn, error, fatal, panic, disable -log_level: "info" - -# Disable this in development to get a list of -# queries used. When enabled super graph -# will only allow queries from this list -# List saved to ./config/allow.list -use_allow_list: true - -# Throw a 401 on auth failure for queries that need auth -# valid values: always, per_query, never -auth_fail_block: always - -# Latency tracing for database queries and remote joins -# the resulting latency information is returned with the -# response -enable_tracing: true - -# File that points to the database seeding script -# seed_file: seed.js - -# Path pointing to where the migrations can be found -# migrations_path: migrations - -# Postgres related environment Variables -# SG_DATABASE_HOST -# SG_DATABASE_PORT -# SG_DATABASE_USER -# SG_DATABASE_PASSWORD - -# Auth related environment Variables -# SG_AUTH_RAILS_COOKIE_SECRET_KEY_BASE -# SG_AUTH_RAILS_REDIS_URL -# SG_AUTH_RAILS_REDIS_PASSWORD -# SG_AUTH_JWT_PUBLIC_KEY_FILE - -# inflections: -# person: people -# sheep: sheep - -auth: - # Can be 'rails' or 'jwt' - type: rails - cookie: _app_session - - # Comment this out if you want to disable setting - # the user_id via a header. Good for testing - header: X-User-ID - - rails: - # Rails version this is used for reading the - # various cookies formats. - version: 5.2 - - # Found in 'Rails.application.config.secret_key_base' - secret_key_base: 0a248500a64c01184edb4d7ad3a805488f8097ac761b76aaa6c17c01dcb7af03a2f18ba61b2868134b9c7b79a122bc0dadff4367414a2d173297bfea92be5566 - - # Remote cookie store. (memcache or redis) - # url: redis://127.0.0.1:6379 - # password: test - # max_idle: 80, - # max_active: 12000, - - # In most cases you don't need these - # salt: "encrypted cookie" - # sign_salt: "signed encrypted cookie" - # auth_salt: "authenticated encrypted cookie" - - # jwt: - # provider: auth0 - # secret: abc335bfcfdb04e50db5bb0a4d67ab9 - # public_key_file: /secrets/public_key.pem - # public_key_type: ecdsa #rsa - -database: - type: postgres - host: db - port: 5432 - dbname: hello_database - user: postgres - password: '' - #pool_size: 10 - #max_retries: 0 - #log_level: "debug" - - # Define variables here that you want to use in filters - # sub-queries must be wrapped in () - variables: - account_id: "(select account_id from users where id = $user_id)" - - # Define defaults to for the field key and values below - defaults: - filter: ["{ user_id: { eq: $user_id } }"] - - # Field and table names that you wish to block - blocklist: - - ar_internal_metadata - - schema_migrations - - secret - - password - - encrypted - - token - - tables: - - name: users - # This filter will overwrite defaults.filter - filter: ["{ id: { eq: $user_id } }"] - - - name: products - # Multiple filters are AND'd together - filter: [ - "{ price: { gt: 0 } }", - "{ price: { lt: 8 } }" - ] - - - name: customers - # No filter is used for this field not - # even defaults.filter - filter: none - - # remotes: - # - name: payments - # id: stripe_id - # url: http://rails_app:3000/stripe/$id - # path: data - # # pass_headers: - # # - cookie - # # - host - # set_headers: - # - name: Authorization - # value: Bearer - - - # You can create new fields that have a - # real db table backing them - name: me - table: users - filter: ["{ id: { eq: $user_id } }"] - - # - name: posts - # filter: ["{ account_id: { _eq: $account_id } }"] \ No newline at end of file diff --git a/hello/docker-compose.yml b/hello/docker-compose.yml deleted file mode 100644 index 7c53795..0000000 --- a/hello/docker-compose.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: '3' -services: - db: - image: postgres - ports: - - "5432:5432" - - hello_api: - image: dosco/super-graph:latest - environment: - GO_ENV: "development" - volumes: - - ./config:/config - ports: - - "8080:8080" - depends_on: - - db \ No newline at end of file diff --git a/hello/seed.js b/hello/seed.js deleted file mode 100644 index 7c53795..0000000 --- a/hello/seed.js +++ /dev/null @@ -1,17 +0,0 @@ -version: '3' -services: - db: - image: postgres - ports: - - "5432:5432" - - hello_api: - image: dosco/super-graph:latest - environment: - GO_ENV: "development" - volumes: - - ./config:/config - ports: - - "8080:8080" - depends_on: - - db \ No newline at end of file