Merge branch 'master-ocelot' into 11-release-v1.0.8-fix-cookies-and-password-reset-etc
# Conflicts: # .github/workflows/publish.yml # README.md # docker-compose.wirsocial.yml # package.json
This commit is contained in:
commit
52c90af25b
11
.github/ISSUE_TEMPLATE/---bug-report.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/---bug-report.md
vendored
Normal 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.-->
|
||||
11
.github/ISSUE_TEMPLATE/---devops-ticket.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/---devops-ticket.md
vendored
Normal 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
15
.github/ISSUE_TEMPLATE/---epic.md
vendored
Normal 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 -->
|
||||
11
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
Normal 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
15
.github/ISSUE_TEMPLATE/---question.md
vendored
Normal 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
11
.github/ISSUE_TEMPLATE/---refactor.md
vendored
Normal 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
10
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Custom issue template
|
||||
about: Describe this issue template's purpose here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
|
||||
26
README.md
26
README.md
@ -1,22 +1,27 @@
|
||||
# Wir.Social Deploys And Rebrands Ocelot.Social
|
||||
|
||||
[](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/actions)
|
||||
[](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/blob/LICENSE.md)
|
||||
[](https://discord.gg/AJSX9DCSUA)
|
||||
[](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding)
|
||||
|
||||
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).
|
||||
|
||||
<!-- [](https://travis-ci.com/Human-Connection/Human-Connection) -->
|
||||
<!-- [](https://codecov.io/gh/Human-Connection/Human-Connection/) -->
|
||||
<!-- [](https://github.com/Human-Connection/Nitro-Backend/blob/backend/LICENSE.md) -->
|
||||
<!-- [](https://discordapp.com/invite/DFSjPaX) -->
|
||||
<!-- [](https://www.codetriage.com/human-connection/human-connection) -->
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<p align="center">
|
||||
<a href="https://wir.social" target="_blank"><img src="branding/static/img/custom/logo-squared.svg" alt="wir.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).
|
||||
<!-- - rebranded staging network: [rebrand.ocelot.social](https://stage.ocelot.social). -->
|
||||
|
||||
Logins:
|
||||
|
||||
@ -25,7 +30,6 @@ Logins:
|
||||
| `user@example.org` | 1234 | user |
|
||||
| `moderator@example.org` | 1234 | moderator |
|
||||
| `admin@example.org` | 1234 | admin |
|
||||
-->
|
||||
|
||||
## Usage
|
||||
|
||||
@ -45,7 +49,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:
|
||||
|
||||
@ -75,7 +79,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:
|
||||
|
||||
|
||||
@ -2,7 +2,25 @@
|
||||
|
||||
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
|
||||
## This Latest 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 prevered 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 envireonments and only for several stage test servers to `true`.
|
||||
|
||||
### Deployment/Rebranding PR – chore: [WIP] 🍰 Refine docs, first step #46
|
||||
|
||||
- Commit: `Update cert-manager apiVersion "cert-manager.io/v1alpha2" to "cert-manager.io/v1"
|
||||
- Check for `kubectl` and `helm` versions.
|
||||
|
||||
## Version >= 1.0.8 with 'ocelotDockerVersionTag' 1.0.8-182
|
||||
|
||||
### PR – feat: 🍰 Configure Cookie Expire Time #43
|
||||
|
||||
|
||||
5
branding/assets/styles/imports/_branding.scss
Normal file
5
branding/assets/styles/imports/_branding.scss
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
*
|
||||
* Here, all SCSS variables and classes can be adapted to your custom design.
|
||||
*
|
||||
*/
|
||||
12
branding/constants/headerMenu.js
Normal file
12
branding/constants/headerMenu.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
MENU: [
|
||||
// {
|
||||
// name: 'Beiträge',
|
||||
// path: '/#',
|
||||
// },
|
||||
// {
|
||||
// name: 'Über Yunite',
|
||||
// url: 'https://yunite.org',
|
||||
// },
|
||||
],
|
||||
}
|
||||
@ -2,6 +2,7 @@
|
||||
// this are the paths in the webapp
|
||||
export default {
|
||||
LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg',
|
||||
LOGO_HEADER_WIDTH: '130px',
|
||||
LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg',
|
||||
LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg',
|
||||
LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg',
|
||||
|
||||
2
branding/locales/de.json
Normal file
2
branding/locales/de.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
2
branding/locales/en.json
Normal file
2
branding/locales/en.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
```
|
||||
|
||||
@ -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 }}"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
apiVersion: cert-manager.io/v1alpha2
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-production
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
apiVersion: cert-manager.io/v1alpha2
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-staging
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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"
|
||||
@ -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
|
||||
|
||||
36
docker-compose.apple-m1.override.yml
Normal file
36
docker-compose.apple-m1.override.yml
Normal 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
|
||||
@ -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: wirsocial/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: wirsocial/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: wirsocial/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: wirsocial/neo4j-community-branded:latest
|
||||
networks:
|
||||
- test-network
|
||||
@ -62,15 +84,7 @@ services:
|
||||
- 7687:7687
|
||||
volumes:
|
||||
- neo4j_data:/data
|
||||
########################################################
|
||||
# MAINTENANCE ##########################################
|
||||
########################################################
|
||||
maintenance:
|
||||
image: wirsocial/maintenance-branded:latest
|
||||
networks:
|
||||
- test-network
|
||||
ports:
|
||||
- 5000:80
|
||||
|
||||
########################################################
|
||||
# MAILSERVER TO FAKE SMTP ##############################
|
||||
########################################################
|
||||
|
||||
@ -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:local-production
|
||||
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 ##############################
|
||||
########################################################
|
||||
|
||||
33
docker/DOCKER_MORE_CLOSELY.md
Normal file
33
docker/DOCKER_MORE_CLOSELY.md
Normal 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).
|
||||
@ -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
|
||||
|
||||
@ -10,9 +10,17 @@ 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/
|
||||
|
||||
RUN apk add --no-cache bash jq
|
||||
|
||||
RUN tools/merge-locales.sh
|
||||
|
||||
##################################################################################
|
||||
# BUILD ##########################################################################
|
||||
@ -41,6 +49,7 @@ 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 package.json for script definitions (lock file should not be needed)
|
||||
COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "wir.social",
|
||||
"version": "1.0.8",
|
||||
"ocelotDockerVersionTag": "1.0.8-182",
|
||||
"version": "1.1.1",
|
||||
"ocelotDockerVersionTag": "1.1.1-228",
|
||||
"dockerOrganisation": "wirsocial",
|
||||
"description": "wir.social Network driven by ocelot.social",
|
||||
"author": "ocelot.social Community",
|
||||
|
||||
12
tools/merge-locales.sh
Executable file
12
tools/merge-locales.sh
Executable 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/
|
||||
Loading…
x
Reference in New Issue
Block a user