Skip to content

Commit

Permalink
final removal of @bedrockio/config
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Dec 10, 2024
1 parent 0cd3a60 commit 2c30c7e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 137 deletions.
63 changes: 2 additions & 61 deletions services/api/.env.production
Original file line number Diff line number Diff line change
@@ -1,62 +1,3 @@
# Note that changing the variables here will require a restart of the app server

SERVER_HOST=0.0.0.0
SERVER_PORT=2300

# Main DB Config
# This file is for local use only. Do NOT put secrets in here.
MONGO_URI=mongodb://localhost/bedrock_production
MONGO_DEBUG=

# Default admin account for dashboard login
ADMIN_NAME=Marlon Brando
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=development.now

# JWT Secret to sign and encrypt tokens
JWT_SECRET=m6bv7!m|E:7:*X3Mx7I)2+Y>B70+&K

# App details for emails
APP_NAME=Bedrock
APP_URL=http://localhost:2200
APP_SUPPORT_EMAIL=[email protected]
APP_COMPANY_ADDRESS=Bedrock Inc, 3 Abbey Road, San Francisco CA 94102
APP_COMPANY_NAME=The Bedrock foundation
APP_PRIMARY_COLOR=#3869d4
# Needs to be a public url that points to png/jpeg (no svg)
APP_LOGO_URL=

API_URL=http://localhost:2300

# Uploads (local|gcs)
UPLOADS_STORE=local
UPLOADS_GCS_BUCKET=bedrock-production-uploads

# Multi-Tenancy
DEFAULT_ORGANIZATION_NAME=

# Sentry Error Tracking
SENTRY_DSN=

ENV_NAME=development

# Postmark mail delivery
POSTMARK_FROM=[email protected]
POSTMARK_API_KEY=
POSTMARK_DEV_EMAIL=
POSTMARK_WEBHOOK_KEY=

# Twilio Messaging
TWILIO_ACCOUNT_SID=ACf9d16ca86a15882e24627571601d77a6
TWILIO_FROM_NUMBER=+16467224582
TWILIO_TEST_NUMBER=
TWILIO_WEBHOOK_URL=
# Note this must be the PRIMARY token to validate webhook signatures.
# This is the test token which will not actually work but is needed
# for the test environment.
TWILIO_AUTH_TOKEN=AC21717619d8cf45502cc2f7cd7aee139d

# Sign in with Google
GOOGLE_CLIENT_ID=

# Sign in with Apple
APPLE_SERVICE_ID=
UPLOADS_GCS_BUCKET=bedrock-production-uploads
63 changes: 2 additions & 61 deletions services/api/.env.staging
Original file line number Diff line number Diff line change
@@ -1,62 +1,3 @@
# Note that changing the variables here will require a restart of the app server

SERVER_HOST=0.0.0.0
SERVER_PORT=2300

# Main DB Config
# This file is for local use only. Do NOT put secrets in here.
MONGO_URI=mongodb://localhost/bedrock_staging
MONGO_DEBUG=

# Default admin account for dashboard login
ADMIN_NAME=Marlon Brando
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=development.now

# JWT Secret to sign and encrypt tokens
JWT_SECRET=m6bv7!m|E:7:*X3Mx7I)2+Y>B70+&K

# App details for emails
APP_NAME=Bedrock
APP_URL=http://localhost:2200
APP_SUPPORT_EMAIL=[email protected]
APP_COMPANY_ADDRESS=Bedrock Inc, 3 Abbey Road, San Francisco CA 94102
APP_COMPANY_NAME=The Bedrock foundation
APP_PRIMARY_COLOR=#3869d4
# Needs to be a public url that points to png/jpeg (no svg)
APP_LOGO_URL=

API_URL=http://localhost:2300

# Uploads (local|gcs)
UPLOADS_STORE=local
UPLOADS_GCS_BUCKET=bedrock-staging-uploads

# Multi-Tenancy
DEFAULT_ORGANIZATION_NAME=

# Sentry Error Tracking
SENTRY_DSN=

ENV_NAME=development

# Postmark mail delivery
POSTMARK_FROM=[email protected]
POSTMARK_API_KEY=
POSTMARK_DEV_EMAIL=
POSTMARK_WEBHOOK_KEY=

# Twilio Messaging
TWILIO_ACCOUNT_SID=ACf9d16ca86a15882e24627571601d77a6
TWILIO_FROM_NUMBER=+16467224582
TWILIO_TEST_NUMBER=
TWILIO_WEBHOOK_URL=
# Note this must be the PRIMARY token to validate webhook signatures.
# This is the test token which will not actually work but is needed
# for the test environment.
TWILIO_AUTH_TOKEN=AC21717619d8cf45502cc2f7cd7aee139d

# Sign in with Google
GOOGLE_CLIENT_ID=

# Sign in with Apple
APPLE_SERVICE_ID=
UPLOADS_GCS_BUCKET=bedrock-staging-uploads
6 changes: 3 additions & 3 deletions services/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"scripts": {
"start": "node --env-file=.env --watch src/index.js",
"debug": "MONGO_DEBUG=true yarn start",
"staging": "node --env-file=.env.staging --watch src/index.js",
"production": "node --env-file=.env.production --watch src/index.js",
"staging": "node --env-file=.env --env-file=.env.staging --watch src/index.js",
"production": "node --env-file=.env --env-file=.env.production --watch src/index.js",
"start:production": "node --env-file=.env src/index",
"lint": "eslint",
"test": "jest",
Expand All @@ -21,7 +21,7 @@
"docs:generate": "./scripts/docs/generate"
},
"dependencies": {
"@bedrockio/fixtures": "^1.2.5",
"@bedrockio/fixtures": "^1.3.0",
"@bedrockio/logger": "^1.0.8",
"@bedrockio/model": "^0.7.3",
"@bedrockio/yada": "^1.2.3",
Expand Down
3 changes: 1 addition & 2 deletions services/api/src/utils/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ const { PassThrough } = require('stream');

const csv = require('fast-csv');
const yd = require('@bedrockio/yada');
const config = require('@bedrockio/config');
const mongoose = require('mongoose');
const { get, startCase } = require('lodash');

const { serializeObject } = require('./serialize');

const formatter = Intl.NumberFormat('us');

const API_URL = config.get('API_URL');
const { API_URL } = process.env;

const DEFAULT_OPTIONS = {
readableHeaders: true,
Expand Down
14 changes: 4 additions & 10 deletions services/api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,11 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bedrockio/config@^2.2.2":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@bedrockio/config/-/config-2.2.3.tgz#bac37d12e36a99ec16668c8b5d1e05dec9658fa9"
integrity sha512-jfOcZIs63S0GaWQjh5vVIISr4b2vA0CWgm630N0FDB6wlW+O0Fsjox92Agx5nggVpSnNYWqzjuKaUb5RY3/ECw==

"@bedrockio/fixtures@^1.2.5":
version "1.2.5"
resolved "https://registry.yarnpkg.com/@bedrockio/fixtures/-/fixtures-1.2.5.tgz#43aed9428d49bcec25a60a0fb39cb70643db7025"
integrity sha512-4gt5dZQuDT8Eu2IJK92XbhpCpL/9Vyc1esypjuB5O8Mt/SEKwL8R4Hjj50WcJ8qfAohLJIU7KIQOFUDR/9YVkg==
"@bedrockio/fixtures@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bedrockio/fixtures/-/fixtures-1.3.0.tgz#80b2154a0c4f858b2628c4f708caf846e6ab4f2d"
integrity sha512-JrJEsIULg+0nXVZZyFAE4DKsMxz3MMbXvNXJowoC8rDwVK2ZBXdT+pe7biDlKoNmsRGdzosIBM24EUgFEo1vmg==
dependencies:
"@bedrockio/config" "^2.2.2"
"@bedrockio/logger" "^1.0.3"
glob "^8.1.0"
jszip "^3.10.1"
Expand Down

0 comments on commit 2c30c7e

Please sign in to comment.