Docker Compose refactoring
This commit is contained in:
parent
7a2a667aaf
commit
a53a26f4c0
36 changed files with 411 additions and 524 deletions
|
|
@ -1,18 +0,0 @@
|
|||
.PHONY: fmt test yarn
|
||||
.npmrc:
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
|
||||
yarn:
|
||||
yarn
|
||||
|
||||
test: yarn
|
||||
mkdir -p coverage
|
||||
yarn lint
|
||||
yarn test
|
||||
|
||||
publish: test .npmrc
|
||||
npm publish
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ We recommend using [@digiresilience/amigo-dev][amigo-dev] to manage your dev dep
|
|||
But if you want to do it manually, then:
|
||||
|
||||
```console
|
||||
$ yarn add -D @digiresilience/babel-preset-amigo
|
||||
$ npm install --save-dev @digiresilience/babel-preset-amigo
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ We recommend using [@digiresilience/amigo-dev][amigo-dev] to manage your dev dep
|
|||
But if you want to do it manually, then:
|
||||
|
||||
```console
|
||||
$ yarn add -D @digiresilience/eslint-config-amigo
|
||||
$ npm install --save-dev @digiresilience/eslint-config-amigo
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
|
|
|||
2
packages/hapi-nextauth/.gitignore
vendored
2
packages/hapi-nextauth/.gitignore
vendored
|
|
@ -8,6 +8,4 @@ coverage
|
|||
*.log
|
||||
package-lock.json
|
||||
.npmrc
|
||||
.yalc
|
||||
yalc.lock
|
||||
junit.xml
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@
|
|||
Makefile
|
||||
.gitlab-ci.yml
|
||||
coverage
|
||||
.yarnrc*
|
||||
jest*
|
||||
tsconfig*
|
||||
*.log
|
||||
test*
|
||||
.yalc
|
||||
yalc.lock
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
test: build
|
||||
mkdir -p coverage
|
||||
yarn test
|
||||
|
||||
.PHONY: build
|
||||
build: node_modules/
|
||||
yarn build
|
||||
|
||||
lint:
|
||||
yarn test:lint
|
||||
|
||||
fmt:
|
||||
yarn fix:prettier
|
||||
yarn fix:lint
|
||||
|
||||
doc:
|
||||
yarn doc
|
||||
|
||||
publish: test
|
||||
npm publish
|
||||
|
||||
# always run yarn when we are in the CI
|
||||
node_modules/: .npmrc
|
||||
@(test -d node_modules && test -z "${CI_JOB_TOKEN}") || yarn
|
||||
|
||||
.npmrc:
|
||||
ifdef CI_JOB_TOKEN
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '@digiresilience:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -rf build tmp coverage yarn-error.log
|
||||
|
||||
distclean: clean
|
||||
rm -rf node_modules
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
version: "3.1"
|
||||
services:
|
||||
db_test:
|
||||
image: postgres:13
|
||||
environment:
|
||||
POSTGRES_PASSWORD: amigo
|
||||
POSTGRES_USER: postgres
|
||||
ports:
|
||||
- "127.0.0.1:5436:5432"
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
test: build
|
||||
mkdir -p coverage
|
||||
yarn test
|
||||
|
||||
.PHONY: build
|
||||
build: node_modules/
|
||||
yarn build
|
||||
|
||||
lint:
|
||||
yarn test:lint
|
||||
|
||||
fmt:
|
||||
yarn fix:prettier
|
||||
yarn fix:lint
|
||||
|
||||
doc:
|
||||
yarn doc
|
||||
|
||||
publish: test
|
||||
npm publish
|
||||
|
||||
node_modules/: .npmrc
|
||||
test -d node_modules || yarn
|
||||
|
||||
.npmrc:
|
||||
ifdef CI_JOB_TOKEN
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '@digiresilience:registry=https://gitlab.com/api/v4/packages/npm/' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -rf build tmp coverage yarn-error.log
|
||||
|
||||
distclean: clean
|
||||
rm -rf node_modules
|
||||
2
packages/metamigo-common/.gitignore
vendored
2
packages/metamigo-common/.gitignore
vendored
|
|
@ -8,6 +8,4 @@ coverage
|
|||
*.log
|
||||
package-lock.json
|
||||
.npmrc
|
||||
.yalc
|
||||
yalc.lock
|
||||
junit.xml
|
||||
|
|
|
|||
|
|
@ -9,5 +9,3 @@ jest*
|
|||
tsconfig*
|
||||
*.log
|
||||
test*
|
||||
.yalc
|
||||
yalc.lock
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const configSchema = {
|
|||
connection: {
|
||||
doc: "The postgres connection url.",
|
||||
format: "uri",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5435/metamigo_dev",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5433/metamigo_dev",
|
||||
env: "METAMIGO_DATABASE_URL",
|
||||
sensitive: true,
|
||||
},
|
||||
|
|
@ -29,7 +29,7 @@ export const configSchema = {
|
|||
connection: {
|
||||
doc: "The postgres connection url for the worker database.",
|
||||
format: "uri",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5435/metamigo_dev",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5433/metamigo_dev",
|
||||
env: "METAMIGO_WORKER_DATABASE_URL",
|
||||
},
|
||||
concurrency: {
|
||||
|
|
@ -55,14 +55,14 @@ export const configSchema = {
|
|||
appRootConnection: {
|
||||
doc: "The postgres root/superuser connection url for development mode so PG can watch the schema changes, this is strangely named in the postgraphile API 'ownerConnectionString'",
|
||||
format: String,
|
||||
default: "postgresql://postgres:metamigo@127.0.0.1:5435/metamigo_dev",
|
||||
default: "postgresql://postgres:metamigo@127.0.0.1:5433/metamigo_dev",
|
||||
env: "METAMIGO_APP_ROOT_DATABASE_URL",
|
||||
},
|
||||
authConnection: {
|
||||
doc: "The postgres connection URL for postgraphile, must not be superuser and must have limited privs.",
|
||||
format: String,
|
||||
default:
|
||||
"postgresql://metamigo_graphile_auth:metamigo@127.0.0.1:5435/metamigo_dev",
|
||||
"postgresql://metamigo_graphile_auth:metamigo@127.0.0.1:5433/metamigo_dev",
|
||||
env: "METAMIGO_DATABASE_AUTH_URL",
|
||||
},
|
||||
visitor: {
|
||||
|
|
@ -88,14 +88,14 @@ export const configSchema = {
|
|||
shadowConnection: {
|
||||
doc: "The shadow databse connection url used by postgraphile-migrate. Not needed in production.",
|
||||
format: "uri",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5435/metamigo_shadow",
|
||||
default: "postgresql://metamigo:metamigo@127.0.0.1:5433/metamigo_shadow",
|
||||
env: "METAMIGO_SHADOW_DATABASE_URL",
|
||||
sensitive: true,
|
||||
},
|
||||
rootConnection: {
|
||||
doc: "The postgres root/superuser connection url for testing only, database must NOT be the app database. Not needed in production.",
|
||||
format: "uri",
|
||||
default: "postgresql://postgres:metamigo@127.0.0.1:5435/template1",
|
||||
default: "postgresql://postgres:metamigo@127.0.0.1:5433/template1",
|
||||
env: "METAMIGO_ROOT_DATABASE_URL",
|
||||
sensitive: true,
|
||||
},
|
||||
|
|
@ -363,10 +363,10 @@ export interface INextAuthConfig {
|
|||
encryptionKey: string;
|
||||
signingKeyB64: string;
|
||||
encryptionKeyB64: string;
|
||||
google?: { id: string; secret: string };
|
||||
github?: { id: string; secret: string };
|
||||
gitlab?: { id: string; secret: string };
|
||||
cognito?: { id: string; secret: string; domain: string };
|
||||
google?: { id: string; secret: string; };
|
||||
github?: { id: string; secret: string; };
|
||||
gitlab?: { id: string; secret: string; };
|
||||
cognito?: { id: string; secret: string; domain: string; };
|
||||
}
|
||||
|
||||
export interface ICFAccessConfig {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
const { spawn } = require("child_process");
|
||||
const findWorkspaceRoot = require("find-yarn-workspace-root");
|
||||
|
||||
if (process.env.CI) {
|
||||
process.exit(0);
|
||||
|
|
@ -21,7 +20,7 @@ spawn(
|
|||
"--no-owner",
|
||||
"--exclude-schema=graphile_migrate",
|
||||
"--exclude-schema=graphile_worker",
|
||||
`--file=${findWorkspaceRoot()}/data/schema.sql`,
|
||||
`--file=../../data/schema.sql`,
|
||||
connectionString,
|
||||
],
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
test: build
|
||||
mkdir -p coverage
|
||||
yarn test
|
||||
|
||||
.PHONY: build
|
||||
build: node_modules/
|
||||
yarn build
|
||||
|
||||
lint:
|
||||
yarn test:lint
|
||||
|
||||
fmt:
|
||||
yarn fix:prettier
|
||||
yarn fix:lint
|
||||
|
||||
doc:
|
||||
yarn doc
|
||||
|
||||
publish: test
|
||||
npm publish
|
||||
|
||||
node_modules/: .npmrc
|
||||
test -d node_modules || yarn
|
||||
|
||||
.npmrc:
|
||||
ifdef CI_JOB_TOKEN
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -rf build tmp coverage yarn-error.log
|
||||
|
||||
distclean: clean
|
||||
rm -rf node_modules
|
||||
|
|
@ -7,7 +7,7 @@ What's this all about? Watch this [video from Stuart Sierra](https://www.youtube
|
|||
## Install
|
||||
|
||||
```console
|
||||
$ yarn add -D @digiresilience/montar
|
||||
$ npm install --save-dev @digiresilience/montar
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
.PHONY: test yarn publish
|
||||
.npmrc:
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
|
||||
yarn:
|
||||
yarn
|
||||
|
||||
test: yarn
|
||||
mkdir -p coverage
|
||||
yarn lint
|
||||
yarn test
|
||||
|
||||
publish: test .npmrc
|
||||
npm publish
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ We recommend using [@digiresilience/amigo-dev][amigo-dev] to manage your dev dep
|
|||
But if you want to do it manually, then:
|
||||
|
||||
```console
|
||||
$ yarn add -D @digiresilience/tsconfig-amigo
|
||||
$ npm install --save-dev @digiresilience/tsconfig-amigo
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue