# abi.de Typo3 CMS

### URLs
* staging: 
  * Backend/CMS: https://staging-abi-cms.meramo.org
  * Frontend: ???
* live: ???

External DB management access:
* staging: 
  * Mysql: https://staging-abi-pma.meramo.org/
  * MongoDB: mongodb://username:password@213.239.225.120:30002/db
    (Credentials can be found in our secure password manager)
* live: ???

External DB management access is only for management purposes NOT for development! 
For development you have to setup local DBs! But you can use the external management i.e. for dumps.


### Deployment Components
* staging: 
  * Backend/CMS:
    * Project Repository: https://git2.meramo.org/typo3/abitypo3cms.git
    * Helm Chart: https://git2.meramo.org/helm_charts/abi-typo3-chart.git
    * ArgoCD Project: stagingabitypo3cms (https://staging-argocd.meramo.org)
      * Application: staging-abitypo3cms
      * MysqlDB: staging-abitypo3cms-db
      * MongoDB: staging-abitypo3cms-mongodb
  * Frontend:
    * ???


### Prerequisites
* Typo3 10
* PHP 7.4
* Mysql DB
* [Composer](https://getcomposer.org/download/)


### Custom Extensions
* mrm_be
* mrmbepages

### TER Extensions
* [ichhabrecht/content-defender](https://extensions.typo3.org/extension/content_defender)
* [wazum/pagetree-resizable](https://extensions.typo3.org/extension/pagetree_resizable)
* [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv)

### DDEV Setup (local development)

* Create a local project directory change to it. (cd projectdir)
* clone this git repo into your projectdir (git clone .....)
* Copy <projectdir>/public/typo3conf/env-file-template to <projectdir>/public/typo3conf/.env and set DB credentials and other
* secrets in the newly created .env .
* ddev config
* Choose 'php' (NOT 'typo3') as kind of project and accept all other default options in the 'ddev config challenge'
* Edit **.ddev/config.yaml**:
* docroot: "abitypo3cms/public"
* php_version: "7.4"
* webimage_extra_packages: [php7.4-mongodb]  # add this line if it is not already there!
* ddev start
* ddev describe (to get an overview of what ddev has build for you)
* ddev ssh (to ssh into the projects web server)
* cd abitypo3cms (on the web server!)
* composer install

------------------------


### Setup (general)
* Clone project.
* Setup mysql db.
* Copy <projectdir>/public/typo3conf/env-file-template to <projectdir>/public/typo3conf/.env and set DB credentials and other
   secrets in the newly created .env .
* Import a fresh dump into your mysql db.
* Fill up the 'fileadmin'-Directory with a fresh backup.
* cd into project's root folder
* composer install


