Merge remote-tracking branch 'origin/master' into

1798-feature-gradidoid-1-adapt-and-migrate-database-schema
This commit is contained in:
Claus-Peter Hübner 2022-07-21 23:59:19 +02:00
commit 7ef6a45f20
9 changed files with 557 additions and 455 deletions

44
DOCKER_MORE_CLOSELY.md Normal file
View File

@ -0,0 +1,44 @@
# Docker More Closely
## Apple M1 Platform
***Attention:** For using Docker commands in Apple M1 environments!*
### Enviroment Variable For Apple M1 Platform
To set the Docker platform environment variable in your terminal tab, run:
```bash
# set env variable for your shell
$ export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
### Docker Compose Override File For Apple M1 Platform
For Docker compose `up` or `build` commands, you can use our Apple M1 override file that specifies the M1 platform:
```bash
# in main folder
# for development
$ docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.apple-m1.override.yml up
# for production
$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up
```
## Analysing Docker Builds
To analyze a Docker build, there is a wonderful tool called [dive](https://github.com/wagoodman/dive). Please sponsor if you're using it!
The `dive build` command is exactly the right one to fulfill what we are looking for.
We can use it just like the `docker build` command and get an analysis afterwards.
So, in our main folder, we use it in the following way:
```bash
# in main folder
$ dive build --target <layer-name> -t "gradido/<app-name>:local-<layer-name>" <app-folder-name-or-dot>/
```
For the specific applications, see our [publish.yml](.github/workflows/publish.yml).

View File

@ -1,60 +1,60 @@
CONFIG_VERSION=v9.2022-07-07 CONFIG_VERSION=v9.2022-07-07
# Server # Server
PORT=4000 PORT=4000
JWT_SECRET=secret123 JWT_SECRET=secret123
JWT_EXPIRES_IN=10m JWT_EXPIRES_IN=10m
GRAPHIQL=false GRAPHIQL=false
GDT_API_URL=https://gdt.gradido.net GDT_API_URL=https://gdt.gradido.net
# Database # Database
DB_HOST=localhost DB_HOST=localhost
DB_PORT=3306 DB_PORT=3306
DB_USER=root DB_USER=root
DB_PASSWORD= DB_PASSWORD=
DB_DATABASE=gradido_community DB_DATABASE=gradido_community
TYPEORM_LOGGING_RELATIVE_PATH=typeorm.backend.log TYPEORM_LOGGING_RELATIVE_PATH=typeorm.backend.log
# Klicktipp # Klicktipp
KLICKTIPP=false KLICKTIPP=false
KLICKTTIPP_API_URL=https://api.klicktipp.com KLICKTTIPP_API_URL=https://api.klicktipp.com
KLICKTIPP_USER=gradido_test KLICKTIPP_USER=gradido_test
KLICKTIPP_PASSWORD=secret321 KLICKTIPP_PASSWORD=secret321
KLICKTIPP_APIKEY_DE=SomeFakeKeyDE KLICKTIPP_APIKEY_DE=SomeFakeKeyDE
KLICKTIPP_APIKEY_EN=SomeFakeKeyEN KLICKTIPP_APIKEY_EN=SomeFakeKeyEN
# Community # Community
COMMUNITY_NAME=Gradido Entwicklung COMMUNITY_NAME=Gradido Entwicklung
COMMUNITY_URL=http://localhost/ COMMUNITY_URL=http://localhost/
COMMUNITY_REGISTER_URL=http://localhost/register COMMUNITY_REGISTER_URL=http://localhost/register
COMMUNITY_REDEEM_URL=http://localhost/redeem/{code} COMMUNITY_REDEEM_URL=http://localhost/redeem/{code}
COMMUNITY_REDEEM_CONTRIBUTION_URL=http://localhost/redeem/CL-{code} COMMUNITY_REDEEM_CONTRIBUTION_URL=http://localhost/redeem/CL-{code}
COMMUNITY_DESCRIPTION=Die lokale Entwicklungsumgebung von Gradido. COMMUNITY_DESCRIPTION=Die lokale Entwicklungsumgebung von Gradido.
# Login Server # Login Server
LOGIN_APP_SECRET=21ffbbc616fe LOGIN_APP_SECRET=21ffbbc616fe
LOGIN_SERVER_KEY=a51ef8ac7ef1abf162fb7a65261acd7a LOGIN_SERVER_KEY=a51ef8ac7ef1abf162fb7a65261acd7a
# EMail # EMail
EMAIL=false EMAIL=false
EMAIL_USERNAME=gradido_email EMAIL_USERNAME=gradido_email
EMAIL_SENDER=info@gradido.net EMAIL_SENDER=info@gradido.net
EMAIL_PASSWORD=xxx EMAIL_PASSWORD=xxx
EMAIL_SMTP_URL=gmail.com EMAIL_SMTP_URL=gmail.com
EMAIL_SMTP_PORT=587 EMAIL_SMTP_PORT=587
EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/{optin}{code} EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/{optin}{code}
EMAIL_LINK_SETPASSWORD=http://localhost/reset-password/{optin} EMAIL_LINK_SETPASSWORD=http://localhost/reset-password/{optin}
EMAIL_LINK_FORGOTPASSWORD=http://localhost/forgot-password EMAIL_LINK_FORGOTPASSWORD=http://localhost/forgot-password
EMAIL_LINK_OVERVIEW=http://localhost/overview EMAIL_LINK_OVERVIEW=http://localhost/overview
EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_VALID_TIME=1440
EMAIL_CODE_REQUEST_TIME=10 EMAIL_CODE_REQUEST_TIME=10
# Webhook # Webhook
WEBHOOK_ELOPAGE_SECRET=secret WEBHOOK_ELOPAGE_SECRET=secret
# EventProtocol # EventProtocol
EVENT_PROTOCOL_DISABLED=false EVENT_PROTOCOL_DISABLED=false
# SET LOG LEVEL AS NEEDED IN YOUR .ENV # SET LOG LEVEL AS NEEDED IN YOUR .ENV
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal # POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
# LOG_LEVEL=info # LOG_LEVEL=info

View File

@ -1,129 +1,129 @@
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env) // ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
import dotenv from 'dotenv' import dotenv from 'dotenv'
import Decimal from 'decimal.js-light' import Decimal from 'decimal.js-light'
dotenv.config() dotenv.config()
Decimal.set({ Decimal.set({
precision: 25, precision: 25,
rounding: Decimal.ROUND_HALF_UP, rounding: Decimal.ROUND_HALF_UP,
}) })
const constants = { const constants = {
DB_VERSION: '0044-adapt_users_table_for_gradidoid', DB_VERSION: '0044-adapt_users_table_for_gradidoid',
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0 DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
LOG4JS_CONFIG: 'log4js-config.json', LOG4JS_CONFIG: 'log4js-config.json',
// default log level on production should be info // default log level on production should be info
LOG_LEVEL: process.env.LOG_LEVEL || 'info', LOG_LEVEL: process.env.LOG_LEVEL || 'info',
CONFIG_VERSION: { CONFIG_VERSION: {
DEFAULT: 'DEFAULT', DEFAULT: 'DEFAULT',
EXPECTED: 'v9.2022-07-07', EXPECTED: 'v9.2022-07-07',
CURRENT: '', CURRENT: '',
}, },
} }
const server = { const server = {
PORT: process.env.PORT || 4000, PORT: process.env.PORT || 4000,
JWT_SECRET: process.env.JWT_SECRET || 'secret123', JWT_SECRET: process.env.JWT_SECRET || 'secret123',
JWT_EXPIRES_IN: process.env.JWT_EXPIRES_IN || '10m', JWT_EXPIRES_IN: process.env.JWT_EXPIRES_IN || '10m',
GRAPHIQL: process.env.GRAPHIQL === 'true' || false, GRAPHIQL: process.env.GRAPHIQL === 'true' || false,
GDT_API_URL: process.env.GDT_API_URL || 'https://gdt.gradido.net', GDT_API_URL: process.env.GDT_API_URL || 'https://gdt.gradido.net',
PRODUCTION: process.env.NODE_ENV === 'production' || false, PRODUCTION: process.env.NODE_ENV === 'production' || false,
} }
const database = { const database = {
DB_HOST: process.env.DB_HOST || 'localhost', DB_HOST: process.env.DB_HOST || 'localhost',
DB_PORT: process.env.DB_PORT ? parseInt(process.env.DB_PORT) : 3306, DB_PORT: process.env.DB_PORT ? parseInt(process.env.DB_PORT) : 3306,
DB_USER: process.env.DB_USER || 'root', DB_USER: process.env.DB_USER || 'root',
DB_PASSWORD: process.env.DB_PASSWORD || '', DB_PASSWORD: process.env.DB_PASSWORD || '',
DB_DATABASE: process.env.DB_DATABASE || 'gradido_community', DB_DATABASE: process.env.DB_DATABASE || 'gradido_community',
TYPEORM_LOGGING_RELATIVE_PATH: process.env.TYPEORM_LOGGING_RELATIVE_PATH || 'typeorm.backend.log', TYPEORM_LOGGING_RELATIVE_PATH: process.env.TYPEORM_LOGGING_RELATIVE_PATH || 'typeorm.backend.log',
} }
const klicktipp = { const klicktipp = {
KLICKTIPP: process.env.KLICKTIPP === 'true' || false, KLICKTIPP: process.env.KLICKTIPP === 'true' || false,
KLICKTTIPP_API_URL: process.env.KLICKTIPP_API_URL || 'https://api.klicktipp.com', KLICKTTIPP_API_URL: process.env.KLICKTIPP_API_URL || 'https://api.klicktipp.com',
KLICKTIPP_USER: process.env.KLICKTIPP_USER || 'gradido_test', KLICKTIPP_USER: process.env.KLICKTIPP_USER || 'gradido_test',
KLICKTIPP_PASSWORD: process.env.KLICKTIPP_PASSWORD || 'secret321', KLICKTIPP_PASSWORD: process.env.KLICKTIPP_PASSWORD || 'secret321',
KLICKTIPP_APIKEY_DE: process.env.KLICKTIPP_APIKEY_DE || 'SomeFakeKeyDE', KLICKTIPP_APIKEY_DE: process.env.KLICKTIPP_APIKEY_DE || 'SomeFakeKeyDE',
KLICKTIPP_APIKEY_EN: process.env.KLICKTIPP_APIKEY_EN || 'SomeFakeKeyEN', KLICKTIPP_APIKEY_EN: process.env.KLICKTIPP_APIKEY_EN || 'SomeFakeKeyEN',
} }
const community = { const community = {
COMMUNITY_NAME: process.env.COMMUNITY_NAME || 'Gradido Entwicklung', COMMUNITY_NAME: process.env.COMMUNITY_NAME || 'Gradido Entwicklung',
COMMUNITY_URL: process.env.COMMUNITY_URL || 'http://localhost/', COMMUNITY_URL: process.env.COMMUNITY_URL || 'http://localhost/',
COMMUNITY_REGISTER_URL: process.env.COMMUNITY_REGISTER_URL || 'http://localhost/register', COMMUNITY_REGISTER_URL: process.env.COMMUNITY_REGISTER_URL || 'http://localhost/register',
COMMUNITY_REDEEM_URL: process.env.COMMUNITY_REDEEM_URL || 'http://localhost/redeem/{code}', COMMUNITY_REDEEM_URL: process.env.COMMUNITY_REDEEM_URL || 'http://localhost/redeem/{code}',
COMMUNITY_REDEEM_CONTRIBUTION_URL: COMMUNITY_REDEEM_CONTRIBUTION_URL:
process.env.COMMUNITY_REDEEM_CONTRIBUTION_URL || 'http://localhost/redeem/CL-{code}', process.env.COMMUNITY_REDEEM_CONTRIBUTION_URL || 'http://localhost/redeem/CL-{code}',
COMMUNITY_DESCRIPTION: COMMUNITY_DESCRIPTION:
process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.', process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.',
} }
const loginServer = { const loginServer = {
LOGIN_APP_SECRET: process.env.LOGIN_APP_SECRET || '21ffbbc616fe', LOGIN_APP_SECRET: process.env.LOGIN_APP_SECRET || '21ffbbc616fe',
LOGIN_SERVER_KEY: process.env.LOGIN_SERVER_KEY || 'a51ef8ac7ef1abf162fb7a65261acd7a', LOGIN_SERVER_KEY: process.env.LOGIN_SERVER_KEY || 'a51ef8ac7ef1abf162fb7a65261acd7a',
} }
const email = { const email = {
EMAIL: process.env.EMAIL === 'true' || false, EMAIL: process.env.EMAIL === 'true' || false,
EMAIL_USERNAME: process.env.EMAIL_USERNAME || 'gradido_email', EMAIL_USERNAME: process.env.EMAIL_USERNAME || 'gradido_email',
EMAIL_SENDER: process.env.EMAIL_SENDER || 'info@gradido.net', EMAIL_SENDER: process.env.EMAIL_SENDER || 'info@gradido.net',
EMAIL_PASSWORD: process.env.EMAIL_PASSWORD || 'xxx', EMAIL_PASSWORD: process.env.EMAIL_PASSWORD || 'xxx',
EMAIL_SMTP_URL: process.env.EMAIL_SMTP_URL || 'gmail.com', EMAIL_SMTP_URL: process.env.EMAIL_SMTP_URL || 'gmail.com',
EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587', EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587',
EMAIL_LINK_VERIFICATION: EMAIL_LINK_VERIFICATION:
process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/checkEmail/{optin}{code}', process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/checkEmail/{optin}{code}',
EMAIL_LINK_SETPASSWORD: EMAIL_LINK_SETPASSWORD:
process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset-password/{optin}', process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset-password/{optin}',
EMAIL_LINK_FORGOTPASSWORD: EMAIL_LINK_FORGOTPASSWORD:
process.env.EMAIL_LINK_FORGOTPASSWORD || 'http://localhost/forgot-password', process.env.EMAIL_LINK_FORGOTPASSWORD || 'http://localhost/forgot-password',
EMAIL_LINK_OVERVIEW: process.env.EMAIL_LINK_OVERVIEW || 'http://localhost/overview', EMAIL_LINK_OVERVIEW: process.env.EMAIL_LINK_OVERVIEW || 'http://localhost/overview',
// time in minutes a optin code is valid // time in minutes a optin code is valid
EMAIL_CODE_VALID_TIME: process.env.EMAIL_CODE_VALID_TIME EMAIL_CODE_VALID_TIME: process.env.EMAIL_CODE_VALID_TIME
? parseInt(process.env.EMAIL_CODE_VALID_TIME) || 1440 ? parseInt(process.env.EMAIL_CODE_VALID_TIME) || 1440
: 1440, : 1440,
// time in minutes that must pass to request a new optin code // time in minutes that must pass to request a new optin code
EMAIL_CODE_REQUEST_TIME: process.env.EMAIL_CODE_REQUEST_TIME EMAIL_CODE_REQUEST_TIME: process.env.EMAIL_CODE_REQUEST_TIME
? parseInt(process.env.EMAIL_CODE_REQUEST_TIME) || 10 ? parseInt(process.env.EMAIL_CODE_REQUEST_TIME) || 10
: 10, : 10,
} }
const webhook = { const webhook = {
// Elopage // Elopage
WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret', WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret',
} }
const eventProtocol = { const eventProtocol = {
// global switch to enable writing of EventProtocol-Entries // global switch to enable writing of EventProtocol-Entries
EVENT_PROTOCOL_DISABLED: process.env.EVENT_PROTOCOL_DISABLED === 'true' || false, EVENT_PROTOCOL_DISABLED: process.env.EVENT_PROTOCOL_DISABLED === 'true' || false,
} }
// This is needed by graphql-directive-auth // This is needed by graphql-directive-auth
process.env.APP_SECRET = server.JWT_SECRET process.env.APP_SECRET = server.JWT_SECRET
// Check config version // Check config version
constants.CONFIG_VERSION.CURRENT = process.env.CONFIG_VERSION || constants.CONFIG_VERSION.DEFAULT constants.CONFIG_VERSION.CURRENT = process.env.CONFIG_VERSION || constants.CONFIG_VERSION.DEFAULT
if ( if (
![constants.CONFIG_VERSION.EXPECTED, constants.CONFIG_VERSION.DEFAULT].includes( ![constants.CONFIG_VERSION.EXPECTED, constants.CONFIG_VERSION.DEFAULT].includes(
constants.CONFIG_VERSION.CURRENT, constants.CONFIG_VERSION.CURRENT,
) )
) { ) {
throw new Error( throw new Error(
`Fatal: Config Version incorrect - expected "${constants.CONFIG_VERSION.EXPECTED}" or "${constants.CONFIG_VERSION.DEFAULT}", but found "${constants.CONFIG_VERSION.CURRENT}"`, `Fatal: Config Version incorrect - expected "${constants.CONFIG_VERSION.EXPECTED}" or "${constants.CONFIG_VERSION.DEFAULT}", but found "${constants.CONFIG_VERSION.CURRENT}"`,
) )
} }
const CONFIG = { const CONFIG = {
...constants, ...constants,
...server, ...server,
...database, ...database,
...klicktipp, ...klicktipp,
...community, ...community,
...email, ...email,
...loginServer, ...loginServer,
...webhook, ...webhook,
...eventProtocol, ...eventProtocol,
} }
export default CONFIG export default CONFIG

View File

@ -15,6 +15,7 @@ export class Contribution {
this.deletedAt = contribution.deletedAt this.deletedAt = contribution.deletedAt
this.confirmedAt = contribution.confirmedAt this.confirmedAt = contribution.confirmedAt
this.confirmedBy = contribution.confirmedBy this.confirmedBy = contribution.confirmedBy
this.contributionDate = contribution.contributionDate
} }
@Field(() => Number) @Field(() => Number)
@ -43,6 +44,9 @@ export class Contribution {
@Field(() => Number, { nullable: true }) @Field(() => Number, { nullable: true })
confirmedBy: number | null confirmedBy: number | null
@Field(() => Date)
contributionDate: Date
} }
@ObjectType() @ObjectType()

View File

@ -1,84 +1,84 @@
GRADIDO_LOG_PATH=/home/gradido/gradido/deployment/bare_metal/log GRADIDO_LOG_PATH=/home/gradido/gradido/deployment/bare_metal/log
# start script # start script
DEPLOY_SEED_DATA=false DEPLOY_SEED_DATA=false
# nginx # nginx
NGINX_REWRITE_LEGACY_URLS=true NGINX_REWRITE_LEGACY_URLS=true
NGINX_SSL=true NGINX_SSL=true
NGINX_SERVER_NAME=stage1.gradido.net NGINX_SERVER_NAME=stage1.gradido.net
NGINX_SSL_CERTIFICATE=/etc/letsencrypt/live/stage1.gradido.net/fullchain.pem NGINX_SSL_CERTIFICATE=/etc/letsencrypt/live/stage1.gradido.net/fullchain.pem
NGINX_SSL_CERTIFICATE_KEY=/etc/letsencrypt/live/stage1.gradido.net/privkey.pem NGINX_SSL_CERTIFICATE_KEY=/etc/letsencrypt/live/stage1.gradido.net/privkey.pem
NGINX_SSL_DHPARAM=/etc/letsencrypt/ssl-dhparams.pem NGINX_SSL_DHPARAM=/etc/letsencrypt/ssl-dhparams.pem
NGINX_SSL_INCLUDE=/etc/letsencrypt/options-ssl-nginx.conf NGINX_SSL_INCLUDE=/etc/letsencrypt/options-ssl-nginx.conf
NGINX_UPDATE_PAGE_ROOT=/home/gradido/gradido/deployment/bare_metal/nginx/update-page NGINX_UPDATE_PAGE_ROOT=/home/gradido/gradido/deployment/bare_metal/nginx/update-page
# webhook # webhook
WEBHOOK_GITHUB_SECRET=secret WEBHOOK_GITHUB_SECRET=secret
WEBHOOK_GITHUB_BRANCH=master WEBHOOK_GITHUB_BRANCH=master
# community # community
COMMUNITY_NAME="Gradido Development Stage1" COMMUNITY_NAME="Gradido Development Stage1"
COMMUNITY_URL=https://stage1.gradido.net/ COMMUNITY_URL=https://stage1.gradido.net/
COMMUNITY_REGISTER_URL=https://stage1.gradido.net/register COMMUNITY_REGISTER_URL=https://stage1.gradido.net/register
COMMUNITY_REDEEM_URL=https://stage1.gradido.net/redeem/{code} COMMUNITY_REDEEM_URL=https://stage1.gradido.net/redeem/{code}
COMMUNITY_REDEEM_CONTRIBUTION_URL=https://stage1.gradido.net/redeem/CL-{code} COMMUNITY_REDEEM_CONTRIBUTION_URL=https://stage1.gradido.net/redeem/CL-{code}
COMMUNITY_DESCRIPTION="Gradido Development Stage1 Test Community" COMMUNITY_DESCRIPTION="Gradido Development Stage1 Test Community"
# backend # backend
BACKEND_CONFIG_VERSION=v9.2022-07-07 BACKEND_CONFIG_VERSION=v9.2022-07-07
JWT_EXPIRES_IN=10m JWT_EXPIRES_IN=10m
GDT_API_URL=https://gdt.gradido.net GDT_API_URL=https://gdt.gradido.net
TYPEORM_LOGGING_RELATIVE_PATH=../deployment/bare_metal/log/typeorm.backend.log TYPEORM_LOGGING_RELATIVE_PATH=../deployment/bare_metal/log/typeorm.backend.log
KLICKTIPP=false KLICKTIPP=false
KLICKTIPP_USER= KLICKTIPP_USER=
KLICKTIPP_PASSWORD= KLICKTIPP_PASSWORD=
KLICKTIPP_APIKEY_DE= KLICKTIPP_APIKEY_DE=
KLICKTIPP_APIKEY_EN= KLICKTIPP_APIKEY_EN=
EMAIL=true EMAIL=true
EMAIL_USERNAME=peter@lustig.de EMAIL_USERNAME=peter@lustig.de
EMAIL_SENDER=peter@lustig.de EMAIL_SENDER=peter@lustig.de
EMAIL_PASSWORD=1234 EMAIL_PASSWORD=1234
EMAIL_SMTP_URL=smtp.lustig.de EMAIL_SMTP_URL=smtp.lustig.de
EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{optin}{code} EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{optin}{code}
EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset-password/{optin} EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset-password/{optin}
EMAIL_LINK_FORGOTPASSWORD=https://stage1.gradido.net/forgot-password EMAIL_LINK_FORGOTPASSWORD=https://stage1.gradido.net/forgot-password
EMAIL_LINK_OVERVIEW=https://stage1.gradido.net/overview EMAIL_LINK_OVERVIEW=https://stage1.gradido.net/overview
EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_VALID_TIME=1440
EMAIL_CODE_REQUEST_TIME=10 EMAIL_CODE_REQUEST_TIME=10
WEBHOOK_ELOPAGE_SECRET=secret WEBHOOK_ELOPAGE_SECRET=secret
# EventProtocol # EventProtocol
EVENT_PROTOCOL_DISABLED=false EVENT_PROTOCOL_DISABLED=false
# database # database
DATABASE_CONFIG_VERSION=v1.2022-03-18 DATABASE_CONFIG_VERSION=v1.2022-03-18
# frontend # frontend
FRONTEND_CONFIG_VERSION=v2.2022-04-07 FRONTEND_CONFIG_VERSION=v2.2022-04-07
GRAPHQL_URI=https://stage1.gradido.net/graphql GRAPHQL_URI=https://stage1.gradido.net/graphql
ADMIN_AUTH_URL=https://stage1.gradido.net/admin/authenticate?token={token} ADMIN_AUTH_URL=https://stage1.gradido.net/admin/authenticate?token={token}
DEFAULT_PUBLISHER_ID=2896 DEFAULT_PUBLISHER_ID=2896
META_URL=http://localhost META_URL=http://localhost
META_TITLE_DE="Gradido Dein Dankbarkeitskonto" META_TITLE_DE="Gradido Dein Dankbarkeitskonto"
META_TITLE_EN="Gradido - Your gratitude account" META_TITLE_EN="Gradido - Your gratitude account"
META_DESCRIPTION_DE="Dankbarkeit ist die Währung der neuen Zeit. Immer mehr Menschen entfalten ihr Potenzial und gestalten eine gute Zukunft für alle." META_DESCRIPTION_DE="Dankbarkeit ist die Währung der neuen Zeit. Immer mehr Menschen entfalten ihr Potenzial und gestalten eine gute Zukunft für alle."
META_DESCRIPTION_EN="Gratitude is the currency of the new age. More and more people are unleashing their potential and shaping a good future for all." META_DESCRIPTION_EN="Gratitude is the currency of the new age. More and more people are unleashing their potential and shaping a good future for all."
META_KEYWORDS_DE="Grundeinkommen, Währung, Dankbarkeit, Schenk-Ökonomie, Natürliche Ökonomie des Lebens, Ökonomie, Ökologie, Potenzialentfaltung, Schenken und Danken, Kreislauf des Lebens, Geldsystem" META_KEYWORDS_DE="Grundeinkommen, Währung, Dankbarkeit, Schenk-Ökonomie, Natürliche Ökonomie des Lebens, Ökonomie, Ökologie, Potenzialentfaltung, Schenken und Danken, Kreislauf des Lebens, Geldsystem"
META_KEYWORDS_EN="Basic Income, Currency, Gratitude, Gift Economy, Natural Economy of Life, Economy, Ecology, Potential Development, Giving and Thanking, Cycle of Life, Monetary System" META_KEYWORDS_EN="Basic Income, Currency, Gratitude, Gift Economy, Natural Economy of Life, Economy, Ecology, Potential Development, Giving and Thanking, Cycle of Life, Monetary System"
META_AUTHOR="Bernd Hückstädt - Gradido-Akademie" META_AUTHOR="Bernd Hückstädt - Gradido-Akademie"
# admin # admin
ADMIN_CONFIG_VERSION=v1.2022-03-18 ADMIN_CONFIG_VERSION=v1.2022-03-18
WALLET_AUTH_URL=https://stage1.gradido.net/authenticate?token={token} WALLET_AUTH_URL=https://stage1.gradido.net/authenticate?token={token}
WALLET_URL=https://stage1.gradido.net/login WALLET_URL=https://stage1.gradido.net/login

View File

@ -0,0 +1,43 @@
# This file defines the Apple M1 chip settings. It overrides docker-compose.override.yml,
# which defines the development settings.
# To use it it is required to explicitly define if you want to build with it:
# > docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.apple-m1.override.yml up
version: "3.4"
services:
########################################################
# FRONTEND #############################################
########################################################
frontend:
platform: linux/amd64
########################################################
# ADMIN INTERFACE ######################################
########################################################
admin:
platform: linux/amd64
#########################################################
## MARIADB ##############################################
#########################################################
mariadb:
platform: linux/amd64
########################################################
# BACKEND ##############################################
########################################################
backend:
platform: linux/amd64
########################################################
# DATABASE #############################################
########################################################
database:
platform: linux/amd64
#########################################################
## NGINX ################################################
#########################################################
nginx:
platform: linux/amd64

View File

@ -1,119 +1,124 @@
version: "3.4" version: "3.4"
services: services:
########################################################
# FRONTEND ############################################# ########################################################
######################################################## # FRONTEND #############################################
frontend: ########################################################
image: gradido/frontend:development frontend:
build: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
target: development image: gradido/frontend:local-development
environment: build:
- NODE_ENV="development" target: development
# - DEBUG=true environment:
volumes: - NODE_ENV="development"
# This makes sure the docker container has its own node modules. # - DEBUG=true
# Therefore it is possible to have a different node version on the host machine volumes:
- frontend_node_modules:/app/node_modules # This makes sure the docker container has its own node modules.
# bind the local folder to the docker to allow live reload # Therefore it is possible to have a different node version on the host machine
- ./frontend:/app - frontend_node_modules:/app/node_modules
# bind the local folder to the docker to allow live reload
######################################################## - ./frontend:/app
# ADMIN INTERFACE ######################################
######################################################## ########################################################
admin: # ADMIN INTERFACE ######################################
image: gradido/admin:development ########################################################
build: admin:
target: development # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
environment: image: gradido/admin:local-development
- NODE_ENV="development" build:
# - DEBUG=true target: development
volumes: environment:
# This makes sure the docker container has its own node modules. - NODE_ENV="development"
# Therefore it is possible to have a different node version on the host machine # - DEBUG=true
- admin_node_modules:/app/node_modules volumes:
# bind the local folder to the docker to allow live reload # This makes sure the docker container has its own node modules.
- ./admin:/app # Therefore it is possible to have a different node version on the host machine
- admin_node_modules:/app/node_modules
######################################################## # bind the local folder to the docker to allow live reload
# BACKEND ############################################## - ./admin:/app
########################################################
backend: ########################################################
image: gradido/backend:development # BACKEND ##############################################
build: ########################################################
target: development backend:
networks: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
- external-net image: gradido/backend:local-development
- internal-net build:
environment: target: development
- NODE_ENV="development" networks:
volumes: - external-net
# This makes sure the docker container has its own node modules. - internal-net
# Therefore it is possible to have a different node version on the host machine environment:
- backend_node_modules:/app/node_modules - NODE_ENV="development"
- backend_database_node_modules:/database/node_modules volumes:
- backend_database_build:/database/build # This makes sure the docker container has its own node modules.
# bind the local folder to the docker to allow live reload # Therefore it is possible to have a different node version on the host machine
- ./backend:/app - backend_node_modules:/app/node_modules
- ./database:/database - backend_database_node_modules:/database/node_modules
- backend_database_build:/database/build
######################################################## # bind the local folder to the docker to allow live reload
# DATABASE ############################################## - ./backend:/app
######################################################## - ./database:/database
database:
# we always run on production here since else the service lingers ########################################################
# feel free to change this behaviour if it seems useful # DATABASE ##############################################
# Due to problems with the volume caching the built files ########################################################
# we changed this to test build. This keeps the service running. database:
image: gradido/database:test_up # we always run on production here since else the service lingers
build: # feel free to change this behaviour if it seems useful
target: test_up # Due to problems with the volume caching the built files
environment: # we changed this to test build. This keeps the service running.
- NODE_ENV="development" # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
volumes: image: gradido/database:local-test_up
# This makes sure the docker container has its own node modules. build:
# Therefore it is possible to have a different node version on the host machine target: test_up
- database_node_modules:/app/node_modules environment:
- database_build:/app/build - NODE_ENV="development"
# bind the local folder to the docker to allow live reload volumes:
- ./database:/app # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine
######################################################### - database_node_modules:/app/node_modules
## MARIADB ############################################## - database_build:/app/build
######################################################### # bind the local folder to the docker to allow live reload
mariadb: - ./database:/app
networks:
- internal-net #########################################################
- external-net ## MARIADB ##############################################
#########################################################
######################################################### mariadb:
## NGINX ################################################ networks:
######################################################### - internal-net
nginx: - external-net
volumes:
- ./logs/nginx:/var/log/nginx #########################################################
## NGINX ################################################
######################################################### #########################################################
## PHPMYADMIN ########################################### nginx:
######################################################### volumes:
phpmyadmin: - ./logs/nginx:/var/log/nginx
image: phpmyadmin
environment: #########################################################
- PMA_ARBITRARY=1 ## PHPMYADMIN ###########################################
#restart: always #########################################################
ports: phpmyadmin:
- 8074:80 image: phpmyadmin
networks: environment:
- internal-net - PMA_ARBITRARY=1
- external-net #restart: always
volumes: ports:
- /sessions - 8074:80
networks:
volumes: - internal-net
frontend_node_modules: - external-net
admin_node_modules: volumes:
backend_node_modules: - /sessions
backend_database_node_modules:
backend_database_build: volumes:
database_node_modules: frontend_node_modules:
database_build: admin_node_modules:
backend_node_modules:
backend_database_node_modules:
backend_database_build:
database_node_modules:
database_build:

View File

@ -1,60 +1,61 @@
version: "3.4" version: "3.4"
services: services:
######################################################## ########################################################
# BACKEND ############################################## # BACKEND ##############################################
######################################################## ########################################################
backend: backend:
image: gradido/backend:test # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
build: image: gradido/backend:test
target: test build:
networks: target: test
- external-net networks:
- internal-net - external-net
environment: - internal-net
- NODE_ENV="test" environment:
- DB_HOST=mariadb - NODE_ENV="test"
- DB_HOST=mariadb
########################################################
# DATABASE ############################################# ########################################################
######################################################## # DATABASE #############################################
database: ########################################################
build: database:
context: ./database build:
target: test_up context: ./database
# restart: always # this is very dangerous, but worth a test for the delayed mariadb startup at first run target: test_up
# restart: always # this is very dangerous, but worth a test for the delayed mariadb startup at first run
#########################################################
## MARIADB ############################################## #########################################################
######################################################### ## MARIADB ##############################################
mariadb: #########################################################
networks: mariadb:
- internal-net networks:
- external-net - internal-net
volumes: - external-net
- db_test_vol:/var/lib/mysql volumes:
- db_test_vol:/var/lib/mysql
#########################################################
## PHPMYADMIN ########################################### #########################################################
######################################################### ## PHPMYADMIN ###########################################
phpmyadmin: #########################################################
image: phpmyadmin phpmyadmin:
environment: image: phpmyadmin
- PMA_ARBITRARY=1 environment:
#restart: always - PMA_ARBITRARY=1
ports: #restart: always
- 8074:80 ports:
networks: - 8074:80
- internal-net networks:
- external-net - internal-net
volumes: - external-net
- /sessions volumes:
- /sessions
networks:
external-net: networks:
internal-net: external-net:
internal: true internal-net:
internal: true
volumes:
db_test_vol: volumes:
db_test_vol:

View File

@ -6,11 +6,13 @@
version: "3.4" version: "3.4"
services: services:
######################################################## ########################################################
# FRONTEND ############################################# # FRONTEND #############################################
######################################################## ########################################################
frontend: frontend:
image: gradido/frontend:latest # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/frontend:local-production
build: build:
context: ./frontend context: ./frontend
target: production target: production
@ -35,7 +37,8 @@ services:
# ADMIN INTERFACE ###################################### # ADMIN INTERFACE ######################################
######################################################## ########################################################
admin: admin:
image: gradido/admin:latest # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/admin:local-production
build: build:
context: ./admin context: ./admin
target: production target: production
@ -77,7 +80,8 @@ services:
# BACKEND ############################################## # BACKEND ##############################################
######################################################## ########################################################
backend: backend:
image: gradido/backend:latest # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/backend:local-production
build: build:
# since we have to include the entities from ./database we cannot define the context as ./backend # since we have to include the entities from ./database we cannot define the context as ./backend
# this might blow build image size to the moon ?! # this might blow build image size to the moon ?!
@ -108,7 +112,8 @@ services:
# DATABASE ############################################# # DATABASE #############################################
######################################################## ########################################################
database: database:
#image: gradido/database:production_up # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/database:local-production_up
build: build:
context: ./database context: ./database
target: production_up target: production_up