resolve conflicts

This commit is contained in:
ogerly 2022-12-01 12:59:24 +01:00
commit fd10880214
44 changed files with 634 additions and 260 deletions

11
.github/ISSUE_TEMPLATE/---bug-report.md vendored Normal file
View File

@ -0,0 +1,11 @@
---
name: "\U0001F41B Bug Report"
about: Create a report to help us improve
title: "\U0001F41B [Bug] XXX"
labels: bug
assignees: ''
---
## :bug: Bug Report
<!-- Describe your issue in detail. Include screenshots if needed. Give us as much information as possible. Use a clear and concise description of what the bug is.-->

View File

@ -0,0 +1,11 @@
---
name: "\U0001F4A5 DevOps Ticket"
about: Help us manage our deployed app.
title: "\U0001F4A5 [DevOps] XXX"
labels: ''
assignees: ''
---
## 💥 DevOps Ticket
<!-- Describe your issue in detail. Include screenshots if needed. Give us as much information as possible. Use a clear and concise description of what the problem is.-->

15
.github/ISSUE_TEMPLATE/---epic.md vendored Normal file
View File

@ -0,0 +1,15 @@
---
name: "\U0001F31F Epic"
about: Define a big development step.
title: "\U0001F31F [EPIC] XXX"
labels: ''
assignees: ''
---
<!-- THIS ISSUE-TYPE IS NOT FOR YOU! -->
<!-- If you need an answer right away, visit the ocelot.social Discord:
https://discord.gg/AJSX9DCSUA -->
## 🌟 EPIC
<!-- Describe your Epic in detail. Include screenshots and drawings -->

View File

@ -0,0 +1,11 @@
---
name: "\U0001F680 Feature Request"
about: Suggest an idea for this project.
title: "\U0001F680 [Feature] XXX"
labels: enhancement
assignees: ''
---
## :rocket: Feature Request
<!-- Give a short summary of the Feature. Use Screenshots if you want. -->

15
.github/ISSUE_TEMPLATE/---question.md vendored Normal file
View File

@ -0,0 +1,15 @@
---
name: "\U0001F4AC Question"
about: If you need help understanding ocelot.social.
title: "\U0001F4AC [Question] XXX"
labels: ''
assignees: ''
---
<!-- Chat with ocelot.social team -->
<!-- If you need an answer right away, visit the ocelot.social Discord:
https://discord.gg/AJSX9DCSUA -->
## 💬 Question
<!-- Describe your Question in detail. Include screenshots and drawings if needed. -->

11
.github/ISSUE_TEMPLATE/---refactor.md vendored Normal file
View File

@ -0,0 +1,11 @@
---
name: "\U0001F527 Refactor"
about: Help us improve our code by refactoring it.
title: "\U0001F527 [Refactor] XXX"
labels: enhancement
assignees: ''
---
## 🔧 Refactor
<!-- Describe your issue in detail. Include screenshots if needed. Give us as much information as possible. Use a clear and concise description of what the problem is.-->

10
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

View File

@ -4,7 +4,7 @@ on:
push:
branches:
- master
# - 14-new-deployment-with-base-and-code # for testing while developing
# - 5059-epic-groups # for testing while developing
jobs:
##############################################################################
@ -83,7 +83,7 @@ jobs:
##########################################################################
- name: Backend | Build `branded` image
run: |
docker build --target branded -t "${DOCKER_ORGANISATION}/backend-branded:latest" -t "${DOCKER_ORGANISATION}/backend-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/backend-branded:${BUILD_VERSION}" -f docker/backend.Dockerfile --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker build --target branded -t "${DOCKER_ORGANISATION}/backend-branded:latest" -t "${DOCKER_ORGANISATION}/backend-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/backend-branded:${BUILD_VERSION}" -f docker/backend.Dockerfile --build-arg "APP_IMAGE=ocelotsocialnetwork/backend" --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker save "${DOCKER_ORGANISATION}/backend-branded" > /tmp/backend-branded.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
@ -125,7 +125,7 @@ jobs:
##########################################################################
- name: Webapp | Build `branded` image
run: |
docker build --target branded -t "${DOCKER_ORGANISATION}/webapp-branded:latest" -t "${DOCKER_ORGANISATION}/webapp-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/webapp-branded:${BUILD_VERSION}" -f docker/webapp.Dockerfile --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker build --target branded -t "${DOCKER_ORGANISATION}/webapp-branded:latest" -t "${DOCKER_ORGANISATION}/webapp-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/webapp-branded:${BUILD_VERSION}" -f docker/webapp.Dockerfile --build-arg "APP_IMAGE=ocelotsocialnetwork/webapp" --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker save "${DOCKER_ORGANISATION}/webapp-branded" > /tmp/webapp-branded.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
@ -167,7 +167,7 @@ jobs:
##########################################################################
- name: Maintenance | Build `branded` image
run: |
docker build --target branded -t "${DOCKER_ORGANISATION}/maintenance-branded:latest" -t "${DOCKER_ORGANISATION}/maintenance-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/maintenance-branded:${BUILD_VERSION}" -f docker/maintenance.Dockerfile --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker build --target branded -t "${DOCKER_ORGANISATION}/maintenance-branded:latest" -t "${DOCKER_ORGANISATION}/maintenance-branded:${VERSION}" -t "${DOCKER_ORGANISATION}/maintenance-branded:${BUILD_VERSION}" -f docker/maintenance.Dockerfile --build-arg "APP_IMAGE=ocelotsocialnetwork/maintenance" --build-arg "APP_IMAGE_TAG_CODE=${OCELOT_DOCKER_VERSION_TAG}-code" --build-arg "APP_IMAGE_TAG_BASE=${OCELOT_DOCKER_VERSION_TAG}-base" .
docker save "${DOCKER_ORGANISATION}/maintenance-branded" > /tmp/maintenance-branded.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
@ -256,6 +256,78 @@ jobs:
- name: Push Maintenance
run: docker push --all-tags ${DOCKER_ORGANISATION}/maintenance-branded
##############################################################################
# JOB: KUBERNETES DEPLOY ACTUAL/LATEST VERSION ######################################
##############################################################################
kubernetes_deploy:
# see example https://github.com/do-community/example-doctl-action
# see example https://github.com/do-community/example-doctl-action/blob/main/.github/workflows/workflow.yaml
name: Kubernetes deploy of latest version to stage.ocelot.social cluster at DigitalOcean
runs-on: ubuntu-latest
needs: [upload_to_dockerhub]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# SET ENVS ###############################################################
##########################################################################
- name: ENV - VERSION
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: ENV - BUILD_DATE
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: ENV - OCELOT_DOCKER_VERSION_TAG
run: echo "OCELOT_DOCKER_VERSION_TAG=$(node -p -e "require('./package.json').ocelotDockerVersionTag")" >> $GITHUB_ENV
- name: ENV - DOCKER_ORGANISATION
run: echo "DOCKER_ORGANISATION=$(node -p -e "require('./package.json').dockerOrganisation")" >> $GITHUB_ENV
# this is based on the node Docker version tag "node:12.19.0-alpine3.10" and looks like "app-branded:1.0.2-3-ocelot.social1.0.2-79"
- name: ENV - BUILD_VERSION
run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}-ocelot.social${OCELOT_DOCKER_VERSION_TAG}" >> $GITHUB_ENV
##########################################################################
# Install DigitalOceans doctl and set kubeconfig #########################
##########################################################################
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 cluster-stage-yunite-me
##########################################################################
# Deploy new Docker images to DigitalOcean Kubernetes cluster ############
##########################################################################
- name: Deploy actual version '$BUILD_VERSION' to DigitalOcean Kubernetes
run: |
kubectl -n default set image deployment/ocelot-webapp container-ocelot-webapp=${DOCKER_ORGANISATION}/webapp-branded:${BUILD_VERSION}
kubectl -n default rollout restart deployment/ocelot-webapp
kubectl -n default set image deployment/ocelot-backend container-ocelot-backend=${DOCKER_ORGANISATION}/backend-branded:${BUILD_VERSION}
kubectl -n default rollout restart deployment/ocelot-backend
kubectl -n default set image deployment/ocelot-maintenance container-ocelot-maintenance=${DOCKER_ORGANISATION}/maintenance-branded:${BUILD_VERSION}
kubectl -n default rollout restart deployment/ocelot-maintenance
kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=${DOCKER_ORGANISATION}/neo4j-community-branded:${BUILD_VERSION}
kubectl -n default rollout restart deployment/ocelot-neo4j
# because this step 'kubectl -n default rollout status deployment/* --timeout=600s' does not work as expected
# and we need the pods to be up again for cleaning and seeding the Neo4j database and the backend.
# !!! this is not a perfect solution !!!
# deployments are regularly up again after 3 minutes and 10 seconds
- name: Sleep for 4 minutes, means 240 seconds
run: sleep 240s
shell: bash
- name: Verify deployment and wait for the pods of each deployment to get ready for cleaning and seeding of the database
run: |
kubectl -n default rollout status deployment/ocelot-backend --timeout=600s
kubectl -n default rollout status deployment/ocelot-neo4j --timeout=600s
kubectl -n default rollout status deployment/ocelot-maintenance --timeout=600s
kubectl -n default rollout status deployment/ocelot-webapp --timeout=600s
- name: Run migrations for Neo4j database via backend for staging
run: |
kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "yarn prod:migrate up"
- name: Reset and seed Neo4j database via backend for staging
# db cleaning and seeding is only possible in production if env 'PRODUCTION_DB_CLEAN_ALLOW=true' is set in deployment
run: |
kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js"
##############################################################################
# JOB: GITHUB TAG LATEST VERSION #############################################
##############################################################################

View File

@ -2,7 +2,7 @@
MIT License
Copyright \(c\) 2021 by the [Ocelot.Social Community](https://github.com/Ocelot-Social-Community)
Copyright \(c\) 2022 by the [Ocelot.Social Community](https://github.com/Ocelot-Social-Community)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -8,14 +8,21 @@
This repository is an in use template to rebrand, configure, and deploy [ocelot.social](https://github.com/Ocelot-Social-Community/Ocelot-Social) networks.
The forked original repository is [Ocelot-Social-Deploy-Rebranding](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding).
<!-- markdownlint-disable MD033 -->
<p align="center">
<a href="https://ocelot.social" target="_blank"><img src="branding/static/img/custom/logo-squared.svg" alt="Ocelot-Social" width="40%" height="40%"></a>
</p>
<!-- markdownlint-enable MD033 -->
<!--
## Live demo
__Try out our deployed [development environment](https://develop.human-connection.org/).__
__Try out our deployed [development environment](https://stage.ocelot.social).__
Visit our staging networks:
- central staging network: [stage.ocelot.social](https://stage.ocelot.social)
- Yunite staging network: [stage.yunite.me](https://stage.yunite.me)
<!-- - rebranded staging network: [rebrand.ocelot.social](https://stage.ocelot.social). -->
Logins:
@ -24,7 +31,6 @@ Logins:
| `user@example.org` | 1234 | user |
| `moderator@example.org` | 1234 | moderator |
| `admin@example.org` | 1234 | admin |
-->
## Usage
@ -44,7 +50,7 @@ The next step is:
- [Configure And Branding](/branding/README.md)
### Optional: Proof Configuration And Branding Locally
### Optional: Locally Testing Configuration And Branding
Just in case you have Docker installed and run the following, you can check your branding locally:
@ -74,7 +80,7 @@ Secondly, in your GitHub repository, click on the 'Settings' tab and go to the '
1. Named `DOCKERHUB_TOKEN` with the newly created DockerHub token (only the code, not the token name).
2. Named `DOCKERHUB_USERNAME` with your DockerHub username.
### Optional: Proof DockerHub Images Locally
### Optional: Locally Testing Your DockerHub Images
Just in case you like to check your pushed Docker images in your organisation's DockerHub repositories locally:

View File

@ -2,13 +2,78 @@
When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings …
## This Latest Version > 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171
## Version >= 2.2.0 with 'ocelotDockerVersionTag' 2.2.0-267
### Main Code PR feat: 🍰 Footer And Header Links Configurable To Have External Link Target #5590
- You have to add property `target` to all array elements with value `url` to your preferred value in `branding/constants/headerMenu.js` originally in main code file `webapp/constants/headerMenu.js`.
- You have to move value of all `externalLink` to new property `externalLink.url` and set new property `externalLink.target` to your preferred value in `branding/constants/links.js` originally in main code file `webapp/constants/links.js`.
### Main Code PR feat: 🍰 Make Donation Progress Bar Color Configurable #5593
- You have to set `PROGRESS_BAR_COLOR_TYPE` in `branding/constants/donation.js` originally in main code file `webapp/constants/donation.js` to your preferred value.
### Main Code PR feat: 🍰 Header Logo Routing Update #5579
- You have to move value of `LOGO_HEADER_CLICK.externalLink` to new property `LOGO_HEADER_CLICK.externalLink.url` and set new property `LOGO_HEADER_CLICK.externalLink.target` to your preferred value in `branding/constants/logos.js` originally in main code file `webapp/constants/logos.js`.
## Version >= 2.0.0 with 'ocelotDockerVersionTag' 2.0.0-250
### Main Code PR feat: 🍰 Implement LOGO_HEADER_CLICK As Configuration #5525
- You have to set `LOGO_HEADER_CLICK` in `branding/constants/logos.js` originally in main code file `webapp/constants/logos.js` to your preferred value.
### Main Code Issue 🌟 [EPIC] Release v2.0.0 Beta Test → Final #5547
- You have to set `SHOW_GROUP_BUTTON_IN_HEADER` in `branding/constants/groups.js` originally in main code file `webapp/constants/groups.js` to your preferred value.
## Version >= 1.1.0 with 'ocelotDockerVersionTag' 1.1.0-205
### Deployment/Rebranding PR chore: 🍰 Release v1.1.0 - Implement Categories Again #63
- You have to add the `CATEGORIES_ACTIVE` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your preferred value.
- Make sure the correct categories are in your Neo4j database on the server.
## Version >= 1.0.9 with 'ocelotDockerVersionTag' 1.0.9-199
### Deployment/Rebranding PR chore: 🍰 Implement PRODUCTION_DB_CLEAN_ALLOW for Staging Production Environments #56
- Copy `PRODUCTION_DB_CLEAN_ALLOW` from `deployment/kubernetes/values.template.yaml` to `values.yaml` and set it to `false` for production environments and only for several stage test servers to `true`.
### Deployment/Rebranding PR chore: [WIP] 🍰 Refine docs, first step #46
Upgrade the cert-manager, but install CRDs of the version 1.0.0-alpha to actually be able to upgrade ocelot. Then uninstall the legacy CRDs and install the correct ones.
```bash
# upgrade cert-manager to 1.9.1
> helm upgrade --set installCRDs=true --version 1.9.1 --namespace cert-manager cert-manager jetstack/cert-manager
# apply legacy CRDs
> kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.0.0-alpha.1/cert-manager.crds.yaml
# upgrade ocelot
> helm upgrade ocelot ./
# delete legacy CRDs
> kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.0.0-alpha.1/cert-manager.crds.yaml
# apply CRDs for cert-manager 1.9.1
> kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml
```
Background: We had to upgrade cert-manager due to an external dependency - therefore we had to update cert-manager apiVersion `cert-manager.io/v1alpha2` to `cert-manager.io/v1`.
The error occurring when not doing this is the following:
```bash
Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: [resource mapping not found for name: "letsencrypt-production" namespace: "" from "": no matches for kind "ClusterIssuer" in version "cert-manager.io/v1alpha2"
ensure CRDs are installed first, resource mapping not found for name: "letsencrypt-staging" namespace: "" from "": no matches for kind "ClusterIssuer" in version "cert-manager.io/v1alpha2"
ensure CRDs are installed first]
```
## Version >= 1.0.8 with 'ocelotDockerVersionTag' 1.0.8-182
### PR feat: 🍰 Configure Cookie Expire Time #43
- You have to add the `COOKIE_EXPIRE_TIME` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your prevered value.
- You have to add the `COOKIE_EXPIRE_TIME` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your preferred value.
- Correct `locale` cookie exploration time in data privacy.
## Version 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171
- No informations.
- No information.

View File

@ -4,21 +4,18 @@
*
*/
@font-face {
font-family: Overpass;
src: url('~@/assets/fonts/Overpass-VariableFont_wght.ttf');
}
$color-primary: #6e8b87;
$color-primary-yunite: #a6ff00;
$color-primary-light: #fff;
$color-primary-active: hsla(0,0%,100%,.8);
$font-family-heading: 'Overpass',Helvetica,Arial,Lucida,sans-serif;;
$font-family-text: 'Overpass',Helvetica,Arial,Lucida,sans-serif;;
$font-family-heading: 'Overpass',Helvetica,Arial,Lucida,sans-serif;
$font-family-text: 'Overpass',Helvetica,Arial,Lucida,sans-serif;
$color-header-background: $color-primary;
$color-footer-background: $color-primary-yunite;
@ -70,4 +67,4 @@ $color-locale-menu: $color-primary-yunite;
text-transform: uppercase;
font-size: 16px;
font-weight: 500;
}
}

View File

@ -0,0 +1 @@
export const PROGRESS_BAR_COLOR_TYPE = 'uni' // 'gradient' is the other option

View File

@ -1,8 +1,8 @@
// this file is duplicated in `backend/src/config/` and `webapp/constants/` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/
export default {
SUPPORT_EMAIL: 'hello@ocelot.social',
MODERATION_EMAIL: 'hello@ocelot.social',
SUPPORT_EMAIL: 'support@yunite.org',
MODERATION_EMAIL: 'hello@yunite.org',
// ATTENTION: the following links have to be defined even for internal pages with full URLs as example like 'https://staging.ocelot.social/support', because they are used in e-mails!
ORGANIZATION_LINK: 'https://ocelot.social',
SUPPORT_LINK: 'https://ocelot.social',
ORGANIZATION_LINK: 'https://yunite.org',
SUPPORT_LINK: 'https://yunite.org',
}

View File

@ -0,0 +1,5 @@
// this file is duplicated in `backend/src/constants/group.js` and `webapp/constants/group.js`
export const NAME_LENGTH_MIN = 3
export const NAME_LENGTH_MAX = 50
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 100 // with removed HTML tags
export const SHOW_GROUP_BUTTON_IN_HEADER = false

View File

@ -0,0 +1,22 @@
export default {
MENU: [
{
nameIdent: 'yuniteRebranding.header.newsFeed',
path: '/',
},
{
nameIdent: 'yuniteRebranding.header.groups',
path: '/groups',
},
{
nameIdent: 'yuniteRebranding.header.topics',
url: 'https://yunite.org/themen/',
target: '',
},
{
nameIdent: 'yuniteRebranding.header.about',
url: 'https://yunite.org',
target: '',
},
],
}

View File

@ -3,7 +3,11 @@
import { defaultPageParamsPages } from '~/components/utils/InternalPages.js'
const ORGANIZATION = defaultPageParamsPages.ORGANIZATION.overwrite({
externalLink: 'https://ocelot.social', // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org',
target: '',
},
internalPage: {
// footerIdent: 'site.made', // localized string identifier, if undefined default is used
@ -12,12 +16,15 @@ const ORGANIZATION = defaultPageParamsPages.ORGANIZATION.overwrite({
hasContainer: true,
hasBaseCard: true,
hasLoginInHeader: true,
// in case internal page content is here 'branding/locales/html/'
// in case internal page content is here 'webapp/locales/html/'
},
})
const DONATE = defaultPageParamsPages.DONATE.overwrite({
// we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
externalLink: 'https://ocelot-social.herokuapp.com/donations', // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/spenden/',
target: '',
},
internalPage: {
// footerIdent: 'site.donate', // localized string identifier, if undefined default is used
@ -30,11 +37,14 @@ const DONATE = defaultPageParamsPages.DONATE.overwrite({
},
})
const IMPRINT = defaultPageParamsPages.IMPRINT.overwrite({
// we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
externalLink: 'https://ocelot-social.herokuapp.com/imprint', // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/impressum/',
target: '',
},
internalPage: {
// footerIdent: 'site.imprint', // localized string identifier, if undefined default is used
footerIdent: 'yuniteRebranding.footer.imprint', // localized string identifier, if undefined default is used
// headTitleIdent: 'site.imprint', // localized string identifier, if undefined default is used
// headlineIdent: 'site.imprint', // localized string identifier, on null it's hidden, if undefined default is used
hasContainer: true,
@ -44,7 +54,7 @@ const IMPRINT = defaultPageParamsPages.IMPRINT.overwrite({
},
})
const TERMS_AND_CONDITIONS = defaultPageParamsPages.TERMS_AND_CONDITIONS.overwrite({
// externalLink: null, // if string is defined and not empty it's dominating
// externalLink: null, // if defined it's dominating
internalPage: {
// footerIdent: 'site.termsAndConditions', // localized string identifier, if undefined default is used
@ -57,7 +67,11 @@ const TERMS_AND_CONDITIONS = defaultPageParamsPages.TERMS_AND_CONDITIONS.overwri
},
})
const CODE_OF_CONDUCT = defaultPageParamsPages.CODE_OF_CONDUCT.overwrite({
// externalLink: null, // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/ueber-yunite/unsere-werte/',
target: '',
},
internalPage: {
// footerIdent: 'site.code-of-conduct', // localized string identifier, if undefined default is used
@ -70,10 +84,14 @@ const CODE_OF_CONDUCT = defaultPageParamsPages.CODE_OF_CONDUCT.overwrite({
},
})
const DATA_PRIVACY = defaultPageParamsPages.DATA_PRIVACY.overwrite({
// externalLink: null, // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/datenschutz/',
target: '',
},
internalPage: {
// footerIdent: 'site.data-privacy', // localized string identifier, if undefined default is used
footerIdent: 'yuniteRebranding.footer.dataPrivacy', // localized string identifier, if undefined default is used
// headTitleIdent: 'site.data-privacy', // localized string identifier, if undefined default is used
// headlineIdent: 'site.data-privacy', // localized string identifier, on null it's hidden, if undefined default is used
hasContainer: true,
@ -83,7 +101,11 @@ const DATA_PRIVACY = defaultPageParamsPages.DATA_PRIVACY.overwrite({
},
})
const FAQ = defaultPageParamsPages.FAQ.overwrite({
// externalLink: null, // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/ueber-yunite/faq-hilfe/',
target: '',
},
internalPage: {
// footerIdent: 'site.faq', // localized string identifier, if undefined default is used
@ -96,7 +118,11 @@ const FAQ = defaultPageParamsPages.FAQ.overwrite({
},
})
const SUPPORT = defaultPageParamsPages.SUPPORT.overwrite({
externalLink: 'https://ocelot.social', // if string is defined and not empty it's dominating
// if defined it's dominating
externalLink: {
url: 'https://yunite.org/ueber-yunite/faq-hilfe/',
target: '',
},
internalPage: {
// footerIdent: 'site.support', // localized string identifier, if undefined default is used
@ -124,13 +150,13 @@ export default {
SUPPORT,
FOOTER_LINK_LIST: [
ORGANIZATION,
TERMS_AND_CONDITIONS,
CODE_OF_CONDUCT,
// ORGANIZATION,
// TERMS_AND_CONDITIONS,
// CODE_OF_CONDUCT,
DATA_PRIVACY,
FAQ,
DONATE,
// FAQ,
// DONATE,
// SUPPORT,
IMPRINT,
SUPPORT,
],
}
}

View File

@ -2,6 +2,14 @@
// this are the paths in the webapp
export default {
LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg',
LOGO_HEADER_WIDTH: '47px',
LOGO_HEADER_CLICK: {
externalLink: {
url: 'https://yunite.org',
target: '',
},
internalPath: null,
},
LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg',
LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg',
LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg',

View File

@ -1,9 +1,9 @@
// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding
export default {
APPLICATION_NAME: 'ocelot.social',
APPLICATION_SHORT_NAME: 'ocelot.social',
APPLICATION_DESCRIPTION: 'Ocelot Social Community',
COOKIE_NAME: 'ocelot-social-token',
ORGANIZATION_NAME: 'busFaktor e.V.',
ORGANIZATION_JURISDICTION: 'Deutschland',
APPLICATION_NAME: 'yunite.me',
APPLICATION_SHORT_NAME: 'yunite.me',
APPLICATION_DESCRIPTION: 'yunite.me Alternatives Netzwerk für eine freie und bunte Zukunft',
COOKIE_NAME: 'yunite-me-token',
ORGANIZATION_NAME: 'yunite Verein für Vernetzung und Kooperation',
ORGANIZATION_JURISDICTION: 'Switzerland',
}

14
branding/locales/de.json Normal file
View File

@ -0,0 +1,14 @@
{
"yuniteRebranding": {
"header": {
"about": "Über Yunite",
"groups": "Gruppen",
"newsFeed": "Beiträge",
"topics": "Themen"
},
"footer": {
"dataPrivacy": "Datenschutz",
"imprint": "Impressum"
}
}
}

14
branding/locales/en.json Normal file
View File

@ -0,0 +1,14 @@
{
"yuniteRebranding": {
"header": {
"about": "About Yunite",
"groups": "Groups",
"newsFeed": "News Feed",
"topics": "Topics"
},
"footer": {
"dataPrivacy": "Data privacy",
"imprint": "Imprint"
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 996 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,3 +1,5 @@
/dns.values.yaml
/dns.values*-ME.yaml
/nginx.values.yaml
/values.yaml
/values*-ME.yaml

View File

@ -17,7 +17,7 @@ $ kubectl config use-context <your-context>
$ kubectl -n default get pods -o wide
```
The very first step is to put the webside into **maintenance mode**.
The very first step is to put the website into **maintenance mode**.
### Set Maintenance Mode

View File

@ -18,17 +18,17 @@ On the right top you find the button `Create`. Click on it and choose `Kubernete
- use the latest Kubernetes version
- choose your datacenter region
- name your node pool: e.g. `pool-<your-network-name>`
- 2 `Basic node` with a total of 4GB and 2 shared CPUs are enough to start with
- no tags necessary
- `2 Basic nodes` with `2.5 GB RAM (total of 4 GB)`, `2 shared CPUs`, and `80 GB Disk` each is optimal for the beginning
- set your cluster name: e.g. `cluster-<your-network-name>`
- select your project
- no tags necessary
## Getting Started
After your cluster is set up, see progress bar above, click on `Getting started`. Please install the following management tools:
After your cluster is set up see progress bar above click on `Getting started`. Please install the following management tools:
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
- [doctl](https://github.com/digitalocean/doctl)
- [kubectl v1.24.1](https://kubernetes.io/docs/tasks/tools/)
- [doctl v1.78.0](https://github.com/digitalocean/doctl)
Install the tools as described on the tab or see the links here.

View File

@ -1,12 +0,0 @@
# LICENSE
MIT License
Copyright \(c\) 2021 Ulf Gebhardt
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -19,15 +19,40 @@ Besides the `values.template.yaml` file we provide a `nginx.values.template.yaml
## Installation
Due to the many limitations of Helm you still have to do several manual steps. Those occur before you run the actual *ocelot.social* Helm chart. Obviously it is expected of you to have `helm` and `kubectl` installed. For DigitalOcean you might require `doctl` aswell.
Due to the many limitations of Helm you still have to do several manual steps.
Those occur before you run the actual *ocelot.social* Helm chart.
Obviously it is expected of you to have `helm` and `kubectl` installed.
For the cert-manager you may need `cmctl`, see below.
For DigitalOcean you may also need `doctl`.
Install:
- [kubectl v1.24.1](https://kubernetes.io/docs/tasks/tools/)
- [doctl v1.78.0](https://docs.digitalocean.com/reference/doctl/how-to/install/)
- [cmctl v1.8.2](https://cert-manager.io/docs/usage/cmctl/#installation)
- [helm v3.9.0](https://helm.sh/docs/intro/install/)
### Cert Manager (https)
Please refer to [cert-manager.io docs](https://cert-manager.io/docs/installation/kubernetes/) for more details.
Please refer to [cert-manager.io docs](https://cert-manager.io/docs/installation/) for more details.
***ATTENTION:*** *Be with the Terminal in your repository in the folder of this README.*
#### 1. Create Namespace
We have three ways to install the cert-manager, purely via `kubectl`, via `cmctl`, or with `helm`.
We recommend using `helm` because then we do not mix the installation methods.
Please have a look here:
- [Installing with Helm](https://cert-manager.io/docs/installation/helm/#installing-with-helm)
Our Helm installation is optimized for cert-manager version `v1.9.1` and `kubectl` version `"v1.24.2`.
Please search here for cert-manager versions that are compatible with your `kubectl` version on the cluster and on the client: [cert-manager Supported Releases](https://cert-manager.io/docs/installation/supported-releases/#supported-releases).
***ATTENTION:*** *When uninstalling cert-manager, be sure to use the same method as for installation! Otherwise, we could end up in a broken state, see [Uninstall](https://cert-manager.io/docs/installation/kubectl/#uninstalling).*
<!-- #### 1. Create Namespace
```bash
# kubeconfig.yaml set globaly
@ -54,19 +79,19 @@ $ helm repo update
# kubeconfig.yaml set globaly
$ helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v1.1.0 \
--version v1.9.1 \
--set installCRDs=true
# or kubeconfig.yaml in your repo, then adjust
$ helm --kubeconfig=/../kubeconfig.yaml \
install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v1.1.0 \
--version v1.9.1 \
--set installCRDs=true
```
``` -->
### Ingress-Nginx
#### 1. Add Helm repository and update
#### 1. Add Helm repository for `ingress-nginx` and update
```bash
$ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
@ -108,7 +133,7 @@ You will need an API token, which you can generate in the control panel at <http
$ doctl kubernetes cluster list
```
Fill in the `CLUSTER_UUID` and `your-domain`:
Fill in the `CLUSTER_UUID` and `your-domain`. The latter with hyphens `-` instead of dots `.`:
```bash
# without doctl context
@ -139,7 +164,7 @@ $ doctl compute firewall get <ID> --context <context-name>
This chart is only necessary (recommended is more precise) if you run DigitalOcean without load balancer.
You need to generate an access token with read + write for the `dns.values.yaml` at <https://cloud.digitalocean.com/account/api/tokens> and fill it in.
#### 1. Add Helm repository and update
#### 1. Add Helm repository for `binami` and update
```bash
$ helm repo add bitnami https://charts.bitnami.com/bitnami
@ -225,3 +250,50 @@ support, try this [helm chart](https://github.com/helm/charts/tree/master/stable
On our kubernetes cluster we get "mult-attach" errors for persistent volumes.
Apparently DigitalOcean's kubernetes clusters do not fulfill the requirements.
## Kubernetes Commands (Without Helm) To Deploy New Docker Images To A Kubernetes Cluster
### Deploy A Version
```bash
# !!! be aware of the correct kube context !!!
$ kubectl config get-contexts
# deploy version '$BUILD_VERSION'
# !!! 'latest' is not recommended on production !!!
# for easyness set env
$ export BUILD_VERSION=1.0.8-48-ocelot.social1.0.8-184 # example
# check this with
$ echo $BUILD_VERSION
1.0.8-48-ocelot.social1.0.8-184
# deploy actual version '$BUILD_VERSION' to Kubernetes cluster
$ kubectl -n default set image deployment/ocelot-webapp container-ocelot-webapp=ocelotsocialnetwork/webapp:$BUILD_VERSION
$ kubectl -n default rollout restart deployment/ocelot-webapp
$ kubectl -n default set image deployment/ocelot-backend container-ocelot-backend=ocelotsocialnetwork/backend:$BUILD_VERSION
$ kubectl -n default rollout restart deployment/ocelot-backend
$ kubectl -n default set image deployment/ocelot-maintenance container-ocelot-maintenance=ocelotsocialnetwork/maintenance:$BUILD_VERSION
$ kubectl -n default rollout restart deployment/ocelot-maintenance
$ kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=ocelotsocialnetwork/neo4j-community:$BUILD_VERSION
$ kubectl -n default rollout restart deployment/ocelot-neo4j
# verify deployment and wait for the pods of each deployment to get ready for cleaning and seeding of the database
$ kubectl -n default rollout status deployment/ocelot-webapp --timeout=240s
$ kubectl -n default rollout status deployment/ocelot-maintenance --timeout=240s
$ kubectl -n default rollout status deployment/ocelot-backend --timeout=240s
$ kubectl -n default rollout status deployment/ocelot-neo4j --timeout=240s
```
### Staging Clean And Seed Neo4j Database
***ATTENTION:*** Cleaning and seeding of our Neo4j database is only possible in production if env `PRODUCTION_DB_CLEAN_ALLOW=true` is set in our deployment.
```bash
# !!! be aware of the correct kube context !!!
$ kubectl config get-contexts
# reset and seed Neo4j database via backend for staging
$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js"
```

View File

@ -11,8 +11,10 @@ metadata:
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
data:
PRODUCTION_DB_CLEAN_ALLOW: "{{ .Values.PRODUCTION_DB_CLEAN_ALLOW }}"
PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}"
INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}"
CATEGORIES_ACTIVE: "{{ .Values.CATEGORIES_ACTIVE }}"
CLIENT_URI: "{{ .Values.BACKEND.CLIENT_URI }}"
EMAIL_DEFAULT_SENDER: "{{ .Values.BACKEND.EMAIL_DEFAULT_SENDER }}"
SMTP_HOST: "{{ .Values.BACKEND.SMTP_HOST }}"

View File

@ -1,4 +1,4 @@
apiVersion: cert-manager.io/v1alpha2
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production

View File

@ -1,4 +1,4 @@
apiVersion: cert-manager.io/v1alpha2
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-staging

View File

@ -26,7 +26,7 @@ spec:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- name: maintenance
- name: container-{{ .Release.Name }}-maintenance
image: "{{ .Values.MAINTENANCE.DOCKER_IMAGE_REPO }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.MAINTENANCE.DOCKER_IMAGE_PULL_POLICY }}
envFrom:

View File

@ -14,6 +14,7 @@ data:
HOST: "0.0.0.0"
PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}"
INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}"
CATEGORIES_ACTIVE: "{{ .Values.CATEGORIES_ACTIVE }}"
COOKIE_EXPIRE_TIME: "{{ .Values.COOKIE_EXPIRE_TIME }}"
WEBSOCKETS_URI: "{{ .Values.WEBAPP.WEBSOCKETS_URI }}"
GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000"

View File

@ -1,9 +1,11 @@
# please duplicate template file and rename to "values.yaml" and fill in your value
# change all the below if needed
PRODUCTION_DB_CLEAN_ALLOW: false # only true for production environments on staging servers
PUBLIC_REGISTRATION: false
INVITE_REGISTRATION: false
COOKIE_EXPIRE_TIME: 730 # days (730 days, two years is the default in main code)
CATEGORIES_ACTIVE: false
BACKEND:
# change all the below if needed

View File

@ -0,0 +1,36 @@
# This docker-compose file is just here for testing
version: "3.4"
services:
########################################################
# WEBAPP ###############################################
########################################################
webapp:
platform: linux/amd64
########################################################
# BACKEND ##############################################
########################################################
backend:
platform: linux/amd64
########################################################
# MAINTENANCE ##########################################
########################################################
maintenance:
platform: linux/amd64
########################################################
# NEO4J ################################################
########################################################
neo4j:
platform: linux/amd64
########################################################
# MAILSERVER TO FAKE SMTP ##############################
########################################################
# commented out, because otherwise override of production would error. and it seems unnecessary
# mailserver:
# platform: linux/amd64

View File

@ -2,10 +2,12 @@
version: "3.4"
services:
########################################################
# WEBAPP ###############################################
########################################################
webapp:
# name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile'
image: ocelotsocialnetwork/webapp-branded:latest
ports:
- 3000:3000
@ -19,10 +21,14 @@ services:
- MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g"
# - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo
- PUBLIC_REGISTRATION=true
- INVITE_REGISTRATION=true
- CATEGORIES_ACTIVE=true
########################################################
# BACKEND ##############################################
########################################################
backend:
# name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile'
image: ocelotsocialnetwork/backend-branded:latest
networks:
- test-network
@ -41,16 +47,32 @@ services:
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
- EMAIL_SUPPORT=support@wir.social
- EMAIL_DEFAULT_SENDER=info@wir.social
# - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers
- PUBLIC_REGISTRATION=true
- INVITE_REGISTRATION=true
- CATEGORIES_ACTIVE=true
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_HOST=mailserver
- SMTP_PORT=25
- SMTP_IGNORE_TLS=true
########################################################
# MAINTENANCE ##########################################
########################################################
maintenance:
# name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile'
image: ocelotsocialnetwork/maintenance-branded:latest
networks:
- test-network
ports:
- 3001:80
########################################################
# NEO4J ################################################
########################################################
neo4j:
# name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile'
image: ocelotsocialnetwork/neo4j-community-branded:latest
networks:
- test-network
@ -62,15 +84,7 @@ services:
- 7687:7687
volumes:
- neo4j_data:/data
########################################################
# MAINTENANCE ##########################################
########################################################
maintenance:
image: ocelotsocialnetwork/maintenance-branded:latest
networks:
- test-network
ports:
- 5000:80
########################################################
# MAILSERVER TO FAKE SMTP ##############################
########################################################

View File

@ -1,11 +1,15 @@
# This docker-compose file is just here for testing
version: "3.4"
services:
########################################################
# WEBAPP ###############################################
########################################################
webapp:
# 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: ocelotsocialnetwork/webapp-branded:local-production
build:
dockerfile: docker/webapp.Dockerfile
target: branded
@ -22,10 +26,15 @@ services:
- MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g"
# - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo
- PUBLIC_REGISTRATION=true
- INVITE_REGISTRATION=true
- CATEGORIES_ACTIVE=true
########################################################
# BACKEND ##############################################
########################################################
backend:
# 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: ocelotsocialnetwork/backend-branded:local-production
build:
dockerfile: docker/backend.Dockerfile
target: branded
@ -47,17 +56,38 @@ services:
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
- EMAIL_SUPPORT=support@wir.social
- EMAIL_DEFAULT_SENDER=info@wir.social
# - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers
- PUBLIC_REGISTRATION=true
- INVITE_REGISTRATION=true
- CATEGORIES_ACTIVE=true
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_HOST=mailserver
- SMTP_PORT=25
- SMTP_IGNORE_TLS=true
########################################################
# MAINTENANCE ##########################################
########################################################
maintenance:
# 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: ocelotsocialnetwork/maintenance-branded:local-production
build:
# TODO: Separate from webapp, this must be independent
dockerfile: docker/maintenance.Dockerfile
target: branded
context: .
networks:
- test-network
ports:
- 3001:80
########################################################
# NEO4J ################################################
########################################################
neo4j:
image: ocelotsocialnetwork/neo4j:community
# 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: ocelotsocialnetwork/neo4j-community-branded:latest
networks:
- test-network
volumes:
@ -68,19 +98,7 @@ services:
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
ports:
- 7687:7687
########################################################
# MAINTENANCE ##########################################
########################################################
maintenance:
build:
# TODO: Separate from webapp, this must be independent
dockerfile: docker/maintenance.Dockerfile
target: branded
context: .
networks:
- test-network
ports:
- 5000:80
########################################################
# MAILSERVER TO FAKE SMTP ##############################
########################################################

View File

@ -0,0 +1,33 @@
# Docker
## Apple M1 Platform
***Attention:** For using Docker commands in Apple M1 environments!*
```bash
# set env variable for your shell
$ export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
For even more informations, see [Docker More Closely](#docker-more-closely)
### 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 production
$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up
# for production testing Docker images from DockerHub
$ docker compose -f docker-compose.ocelotsocial-branded.yml -f docker-compose.apple-m1.override.yml up
# only once: init admin user and create indexes and contraints in Neo4j database
$ docker compose exec backend /bin/sh -c "yarn prod:migrate init"
```
## Docker More Closely In Main Code
To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md).

View File

@ -1,4 +1,4 @@
ARG APP_IMAGE=ocelotsocialnetwork/neo4j
ARG APP_IMAGE=ocelotsocialnetwork/neo4j-community
ARG APP_IMAGE_TAG=latest
ARG APP_IMAGE_COMMUNITY=${APP_IMAGE}:${APP_IMAGE_TAG}
@ -10,4 +10,5 @@ FROM $APP_IMAGE_COMMUNITY as community-branded
##################################################################################
# ENTERPRISE #####################################################################
##################################################################################
# Todo: refactor this with 'APP_IMAGE', 'APP_IMAGE_TAG', and similar to 'APP_IMAGE_COMMUNITY', Neo4j 'dockerfile' from main code
FROM ocelotsocialnetwork/neo4j-enterprise:latest as enterprise-branded

View File

@ -10,9 +10,18 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE}
FROM $APP_IMAGE_CODE as code
# copy public constants into the Docker image to brand it
COPY tools/ tools/
COPY branding/static/ static/
COPY branding/constants/ constants/
COPY branding/locales/ locales/
COPY branding/locales/html/ locales/html/
# COPY branding/locales/index.js locales/index.js
COPY branding/locales/*.json locales/tmp/
COPY branding/assets/styles/imports/ assets/styles/imports/
COPY branding/assets/fonts/ assets/fonts/
RUN apk add --no-cache bash jq
RUN tools/merge-locales.sh
##################################################################################
# BUILD ##########################################################################
@ -41,6 +50,8 @@ COPY --from=build ${DOCKER_WORKDIR}/config/ ./config/
COPY --from=build ${DOCKER_WORKDIR}/constants ./constants
COPY --from=build ${DOCKER_WORKDIR}/static ./static
COPY --from=build ${DOCKER_WORKDIR}/locales ./locales
COPY --from=build ${DOCKER_WORKDIR}/assets/styles/imports ./assets/styles/imports
COPY --from=build ${DOCKER_WORKDIR}/assets/fonts ./assets/fonts
# Copy package.json for script definitions (lock file should not be needed)
COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json

View File

@ -1,10 +1,10 @@
{
"name": "yunite.net",
"version": "1.0.8",
"ocelotDockerVersionTag": "1.0.8-182",
"dockerOrganisation": "XXX",
"description": "yunite.net Branded",
"author": "yunite.net Community",
"name": "yunite.me",
"version": "2.2.0",
"ocelotDockerVersionTag": "2.2.0-267",
"dockerOrganisation": "tirokk",
"description": "yunite.me Alternatives Netzwerk für eine freie und bunte Zukunft",
"author": "yunite Verein für Vernetzung und Kooperation",
"license": "MIT",
"private": false,
"repository": {

12
tools/merge-locales.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
for locale in `ls locales/*.json`;
do
file=$(basename $locale);
if [ -f locales/tmp/$file ]; then
jq -s '.[0] * .[1]' $locale locales/tmp/$file > locales/tmp/tmp.json;
mv locales/tmp/tmp.json $locale;
fi;
done;
rm -r locales/tmp/