Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Introduce a Sitepackage (to be amended) #36

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ddev/commands/host/cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

## Description: Cleanup the project (deletes database, .build folder and composer.lock)
## Usage: cleanup
## Example: "ddev cleanup"

# Delete project containers (database)
ddev delete -Oy

# Delete working directory
rm composer.lock
rm -rf .build
41 changes: 41 additions & 0 deletions .ddev/commands/web/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

## Description: Initialize the project for development
## Usage: init
## Example: "ddev init"

# Load statements into $SQL
#read -r -d '' SQL <<EOF
#SET FOREIGN_KEY_CHECKS = 0;
#SET GROUP_CONCAT_MAX_LEN=32768;
#SET @tables = NULL;
#SELECT GROUP_CONCAT('`', TABLE_NAME, '`') INTO @tables
# FROM information_schema.TABLES
# WHERE TABLE_SCHEMA = (SELECT DATABASE());
#SELECT IFNULL(@tables,'dummy') INTO @tables;

#SET @tables = CONCAT('TRUNCATE TABLE IF EXISTS ', @tables);
#PREPARE stmt FROM @tables;
#EXECUTE stmt;
#DEALLOCATE PREPARE stmt;
#SET FOREIGN_KEY_CHECKS = 1;
#EOF

#mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done

# Truncate all database tables
mysql --user=db --password=db -Nse 'show tables' db | while read table; do echo "drop table $table;"; done | mysql --user=db --password=db db
#echo $SQL | mysql --user=db --password=db --database=db

# Delete working directory, preserve DDEV settings
mv .build/public/typo3conf/AdditionalConfiguration.php ./AdditionalConfiguration.php
rm composer.lock > /dev/null 2>&1
rm -rf .build > /dev/null 2>&1
mkdir -p .build/public/typo3conf
mv ./AdditionalConfiguration.php .build/public/typo3conf/AdditionalConfiguration.php

# Import factory data
composer install --no-suggest --no-interaction

# Add Import / Export preset
mysql --user=db --password=db --database=db < Resources/Private/ImportExportPreset.sql
7 changes: 7 additions & 0 deletions .ddev/commands/web/typo3
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

## Description: Run TYPO3 CLI inside the web container
## Usage: typo3 [flags] [args]
## Example: "ddev typo3 list" or "ddev typo3 upgrade:run"

.build/bin/typo3 $@
7 changes: 7 additions & 0 deletions .ddev/commands/web/typo3cms
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

## Description: Run TYPO3 Console inside the web container
## Usage: typo3cms [flags] [args]
## Example: "ddev typo3cms install:generatepackagestates" or "ddev typo3cms install:fixfolderstructure" or "ddev typo3cms"

.build/bin/typo3cms $@
169 changes: 169 additions & 0 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: introduction
type: typo3
docroot: .build/public
php_version: "7.2"
webserver_type: apache-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
provider: default
hooks:
pre-start:
- exec-host: mkdir -p .build/public/typo3conf
post-start:
- exec: test -d .build/public/typo3conf/Localconfiguration.php || composer install --no-suggest --no-interaction
use_dns_when_possible: true


# This config.yaml was created with ddev version v1.15.3
# webimage: drud/ddev-webserver:v1.15.3
# dbimage: drud/ddev-dbserver-mariadb-10.2:v1.15.1
# dbaimage: phpmyadmin/phpmyadmin:5
# However we do not recommend explicitly wiring these images into the
# config.yaml as they may break future versions of ddev.
# You can update this config.yaml using 'ddev config'.

# Key features of ddev's config.yaml:

# name: <projectname> # Name of the project, automatically provides
# http://projectname.ddev.site and https://projectname.ddev.site

# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php

# docroot: <relative_path> # Relative path to the directory containing index.php.

# php_version: "7.3" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"

# You can explicitly specify the webimage, dbimage, dbaimage lines but this
# is not recommended, as the images are often closely tied to ddev's' behavior,
# so this can break upgrades.

# webimage: <docker_image> # nginx/php docker image.
# dbimage: <docker_image> # mariadb docker image.
# dbaimage: <docker_image>

# mariadb_version and mysql_version
# ddev can use many versions of mariadb and mysql
# However these directives are mutually exclusive
# mariadb_version: 10.2
# mysql_version: 8.0

# router_http_port: <port> # Port to be used for http (defaults to port 80)
# router_https_port: <port> # Port for https (defaults to 443)

# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev exec enable_xdebug" and "ddev exec disable_xdebug" work better,
# as leaving xdebug enabled all the time is a big performance hit.

# webserver_type: nginx-fpm # Can be set to apache-fpm or apache-cgi as well

# timezone: Europe/Berlin
# This is the timezone used in the containers and by PHP;
# it can be set to any valid timezone,
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# For example Europe/Dublin or MST7MDT

# additional_hostnames:
# - somename
# - someothername
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".

# additional_fqdns:
# - example.com
# - sub1.example.com
# would provide http and https URLs for "example.com" and "sub1.example.com"
# Please take care with this because it can cause great confusion.

# upload_dir: custom/upload/dir
# would set the destination path for ddev import-files to custom/upload/dir.

# working_dir:
# web: /var/www/html
# db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.

# omit_containers: [db, dba, ddev-ssh-agent]
# Currently only these containers are supported. Some containers can also be
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
# the "db" container, several standard features of ddev that access the
# database container will be unusable.

# nfs_mount_enabled: false
# Great performance improvement but requires host configuration first.
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container

# host_https_port: "59002"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.

# host_webserver_port: "59001"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.

# host_db_port: "59002"
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.

# phpmyadmin_port: "8036"
# phpmyadmin_https_port: "8037"
# The PHPMyAdmin ports can be changed from the default 8036 and 8037

# mailhog_port: "8025"
# mailhog_https_port: "8026"
# The MailHog ports can be changed from the default 8025 and 8026

# webimage_extra_packages: [php7.3-tidy, php-bcmath]
# Extra Debian packages that are needed in the webimage can be added here

# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here

# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true

# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# If you prefer you can change this to "ddev.local" to preserve
# pre-v1.9 behavior.

# ngrok_args: --subdomain mysite --auth username:pass
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs#http or run "ngrok http -h"

# disable_settings_management: false
# If true, ddev will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalSettings.php
# In this case the user must provide all such settings.

# no_project_mount: false
# (Experimental) If true, ddev will not mount the project into the web container;
# the user is responsible for mounting it manually or via a script.
# This is to enable experimentation with alternate file mounting strategies.
# For advanced users only!

# provider: default # Currently either "default" or "pantheon"
#
# Many ddev commands can be extended to run tasks before or after the
# ddev command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:
# post-start:
# - exec: composer install -d /var/www/html
17 changes: 17 additions & 0 deletions .ddev/docker-compose.environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.6'

services:
web:
environment:
- TYPO3_CONTEXT=Development
# TYPO3 Console Setup support
- TYPO3_INSTALL_ADMIN_USER=admin
- TYPO3_INSTALL_ADMIN_PASSWORD=password
- TYPO3_INSTALL_SITE_NAME=TYPO3 Introduction Package
- TYPO3_INSTALL_SITE_SETUP_TYPE=no
- TYPO3_INSTALL_WEB_SERVER_CONFIG=apache
# TYPO3 Testing Framework support
- typo3DatabaseHost=db
- typo3DatabaseName=t3func
- typo3DatabasePassword=root
- typo3DatabaseUsername=root
9 changes: 9 additions & 0 deletions .ddev/docker-compose.tempfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.6'

services:
web:
volumes:
- type: tmpfs
target: /var/www/html/.build/var/cache
tmpfs:
size: 268435456
57 changes: 57 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# TS/JS-Files
[*.{ts,js}]
indent_size = 2

# JSON-Files
[*.json]
indent_style = tab

# ReST-Files
[*.rst]
indent_size = 3
max_line_length = 80

# YAML-Files
[*.{yaml,yml}]
indent_size = 2

# package.json
# .travis.yml
[{package.json,.travis.yml}]
indent_size = 2

# TypoScript
[*.{typoscript,tsconfig}]
indent_size = 2

# XLF-Files
[*.xlf]
indent_style = tab

# SQL-Files
[*.sql]
indent_style = tab
indent_size = 2

# .htaccess
[{_.htaccess,.htaccess}]
indent_style = tab

# Visual Studio Code JSON-Files
[.vscode/*.json]
indent_style = space
indent_size = 4
37 changes: 37 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Folders
/.ddev export-ignore
/.github export-ignore
/.vscode export-ignore
/Build export-ignore

# Files
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs.dist export-ignore
.scrutinizer.yml export-ignore
.stylelintrc export-ignore
.travis.yml export-ignore

# Enforce checkout with linux lf consistent over all plattforms
.ddev/commands/*/* text eol=lf
*.xml text eol=lf
*.html text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.svg text eol=lf
*.tmpl text eol=lf
*.less text eol=lf
*.js text eol=lf
*.json text eol=lf
*.php text eol=lf
*.rst text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.ts text eol=lf
*.xlf text eol=lf
*.sql text eol=lf
*.t3s text eol=lf
*.txt text eol=lf
*.typoscript text eol=lf
*.tsconfig text eol=lf
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
Documentation-GENERATED-temp/
# Folders
/.build
/Documentation-GENERATED-temp

# Files
*.cache
.php_cs
composer.lock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Packages/TYPO3-Console"]
path = Packages/TYPO3-Console
url = https://github.com/gilbertsoft/TYPO3-Console.git
Loading