Commit 1a86d5e6 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Inital commit.

* Copy from TER
* Changes folders and documentation
parents
TYPO3_SITENAME=TYPO3 Extension Repository
TYPO3_CONTEXT=Development
DATABASE_USER=t3o
DATABASE_USER_PASSWORD=k6mdcMp0MATlzKAE1RW6qFmmilqt2HNkQhbVgztu
DATABASE_HOST_NAME=db
DATABASE_PORT=3306
DATABASE_NAME=t3o
DATABASE_ROOT_PASSWORD=uf5c92eCULghtfdEdqH0hsfvnPSuEY7cnPKk5MAz
ADMIN_USER_NAME=t3o
ADMIN_PASSWORD=x2VsAVQNJd8UiDdu9a76
# Created by .ignore support plugin (hsz.mobi)
.idea
typo3_src
bin/*
!bin/scripts/
vendor
htdocs/fileadmin
htdocs/typo3temp
htdocs/uploads
htdocs/typo3
htdocs/index.php
htdocs/typo3conf/ext/*
htdocs/typo3conf/PackageStates.php
!htdocs/typo3conf/ext/ter*
DOCKER_COMPOSE="$$(pwd)/data/scripts/docker-compose.sh"
COMPOSER="$$(pwd)/data/scripts/composer.sh"
include .env
init: composer-install install-typo3
reset: kill down init
up:
$(DOCKER_COMPOSE) up -d
ps:
$(DOCKER_COMPOSE) ps
stop:
$(DOCKER_COMPOSE) stop
kill:
$(DOCKER_COMPOSE) kill
build:
$(DOCKER_COMPOSE) build --no-cache
pull:
$(DOCKER_COMPOSE) pull
log:
$(DOCKER_COMPOSE) logs -f --tail=100
down:
$(DOCKER_COMPOSE) down --remove-orphans
composer-install:
$(COMPOSER) --working-dir=data/typo3 install
composer-update:
$(COMPOSER) --working-dir=data/typo3 up
install-typo3: up
$(DOCKER_COMPOSE) run --rm db /src/data/scripts/wait-for-it.sh -h $(DATABASE_HOST_NAME) -p $(DATABASE_PORT) -t 30
$(DOCKER_COMPOSE) run --rm php ./bin/typo3cms install:setup \
--non-interactive \
--force \
--database-user-name $(DATABASE_USER) \
--database-user-password $(DATABASE_USER_PASSWORD) \
--database-host-name $(DATABASE_HOST_NAME) \
--database-port $(DATABASE_PORT) \
--database-name $(DATABASE_NAME) \
--use-existing-database \
--admin-user-name $(ADMIN_USER_NAME) \
--admin-password $(ADMIN_PASSWORD) \
--site-name $(TYPO3_SITENAME) \
--site-setup-type site
# TYPO3.org main page
## typo3.org
### Prerequisites
[docker engine](https://docs.docker.com/engine/installation/)
Make sure to have an instance of [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) running on your development box.
An easy way to get it up and running is using [torvitas/nginx-proxy-configuration](https://github.com/torvitas/docker-nginx-proxy-configuration).
### Quickstart
`
git clone https://git-t3o.typo3.org/t3o/typo3.org.git
go in "typo3.org" directory
make init up log
go to folder ``data/typo3/html/typo3conf`` and copy ``AdditionalConfiguration.sample.php`` to ``AdditionalConfiguration.php``
... and finally [click here](https://ter.typo3.127.0.0.1.xip.io)
### Composer
Example:
`
./data/scripts/composer.sh --working-dir=data/typo3/ info
`
For your convenience there are the following make jobs:
`
make composer-install
make composer-update
`
access_log /proc/self/fd/1;
error_log /proc/self/fd/2;
server {
server_name ter.typo3.localhost;
listen 80;
index index.php index.html;
root /var/www/html/;
include /etc/nginx/conf.d/typo3.base;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_param TYPO3_CONTEXT Development;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 1200;
}
client_max_body_size 100M;
location ~ /\.(js|css)$ {
expires 604800s;
}
if (!-e $request_filename){
rewrite ^/(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ /$1.$3 last;
}
location ~* ^/fileadmin/(.*/)?_recycler_/ {
deny all;
}
location ~* ^/fileadmin/templates/.*(\.txt|\.ts)$ {
deny all;
}
location ~* ^/typo3conf/ext/[^/]+/Resources/Private/ {
deny all;
}
location ~* ^/(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) {
}
location / {
if ($query_string ~ ".+") {
return 405;
}
if ($http_cookie ~ 'nc_staticfilecache|be_typo_user|fe_typo_user' ) {
return 405;
} # pass POST requests to PHP
if ($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
if ($http_pragma = 'no-cache') {
return 405;
}
if ($http_cache_control = 'no-cache') {
return 405;
}
error_page 405 = @nocache;
try_files /typo3temp/tx_ncstaticfilecache/$host${request_uri}index.html @nocache;
}
location @nocache {
try_files $uri $uri/ /index.php$is_args$args;
}
#!/bin/bash
#
# Run composer in a container
#
# This script will attempt to mirror the host paths by using volumes for the
# following paths:
# * $(pwd)
# * $(dirname $COMPOSE_FILE) if it's set
# * $HOME if it's set
#
# You can add additional volumes (or any docker run options) using
# the $COMPOSER_OPTIONS environment variable.
COMPOSER_OPTIONS=${COMPOSER_OPTIONS:-}
# You can set the composer cache directory using the $COMPOSER_CACHE
# environment variable.
COMPOSER_CACHE=${COMPOSER_CACHE:-/tmp/composer}
# You can set the ssh key to be used using the $SSH_IDENTITY_FILE
# environment variable.
SSH_IDENTITY_FILE=${SSH_IDENTITY_FILE:-~/.ssh/id_rsa}
set -e
VERSION="1.2-alpine"
IMAGE="composer/composer:$VERSION"
# Setup volume mounts for composer config, context and ssh keys
if [ "$(pwd)" != '/' ]; then
VOLUMES="-v $(pwd):$(pwd)"
fi
if [ -n "$COMPOSER_FILE" ]; then
composer_dir=$(dirname $COMPOSER_FILE)
fi
# TODO: also check --file argument
if [ -n "$composer_dir" ]; then
VOLUMES="$VOLUMES -v $composer_dir:$composer_dir"
fi
if [ -n "$SSH_IDENTITY_FILE" ]; then
ssh_identity_dir=$(dirname $SSH_IDENTITY_FILE)
fi
# TODO: also check --file argument
if [ -n "$ssh_identity_dir" ]; then
VOLUMES="$VOLUMES -v $ssh_identity_dir:/root/.ssh"
fi
if [ -n "$COMPOSER_CACHE" ]; then
composer_cache_dir=$(dirname $COMPOSER_CACHE)
fi
# TODO: also check --file argument
if [ -n "$composer_cache_dir" ]; then
VOLUMES="$VOLUMES -v $composer_cache_dir:/composer/cache"
fi
if [ -n "$HOME" ]; then
VOLUMES="$VOLUMES -v $HOME:$HOME -v $HOME:/root" # mount $HOME in /root to share docker.config
fi
# Only allocate tty if we detect one
if [ -t 1 ]; then
DOCKER_RUN_OPTIONS="-t"
fi
if [ -t 0 ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
fi
exec docker run --rm -u $(id -u) $DOCKER_RUN_OPTIONS $COMPOSER_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
#!/bin/bash
#
# Run docker-compose in a container
#
# This script will attempt to mirror the host paths by using volumes for the
# following paths:
# * $(pwd)
# * $(dirname $COMPOSE_FILE) if it's set
# * $HOME if it's set
#
# You can add additional volumes (or any docker run options) using
# the $COMPOSE_OPTIONS environment variable.
#
set -e
VERSION="1.8.1"
IMAGE="docker/compose:$VERSION"
# Setup options for connecting to docker host
if [ -z "$DOCKER_HOST" ]; then
DOCKER_HOST="/var/run/docker.sock"
fi
if [ -S "$DOCKER_HOST" ]; then
DOCKER_ADDR="-v $DOCKER_HOST:$DOCKER_HOST -e DOCKER_HOST"
else
DOCKER_ADDR="-e DOCKER_HOST -e DOCKER_TLS_VERIFY -e DOCKER_CERT_PATH"
fi
# Setup volume mounts for compose config and context
if [ "$(pwd)" != '/' ]; then
VOLUMES="-v $(pwd):$(pwd)"
fi
if [ -n "$COMPOSE_FILE" ]; then
compose_dir=$(dirname $COMPOSE_FILE)
fi
# TODO: also check --file argument
if [ -n "$compose_dir" ]; then
VOLUMES="$VOLUMES -v $compose_dir:$compose_dir"
fi
if [ -n "$HOME" ]; then
VOLUMES="$VOLUMES -v $HOME:$HOME -v $HOME:/root" # mount $HOME in /root to share docker.config
fi
# Only allocate tty if we detect one
if [ -t 1 ]; then
DOCKER_RUN_OPTIONS="-t"
fi
if [ -t 0 ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
fi
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
cmdname=$(basename $0)
echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2
Usage:
$cmdname host:port [-s] [-t timeout] [-- command args]
-h HOST | --host=HOST Host or IP under test
-p PORT | --port=PORT TCP port under test
Alternatively, you specify the host and port as host:port
-s | --strict Only execute subcommand if the test succeeds
-q | --quiet Don't output any status messages
-t TIMEOUT | --timeout=TIMEOUT
Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit 1
}
wait_for()
{
if [[ $TIMEOUT -gt 0 ]]; then
echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT"
else
echoerr "$cmdname: waiting for $HOST:$PORT without a timeout"
fi
start_ts=$(date +%s)
while :
do
(echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1
result=$?
if [[ $result -eq 0 ]]; then
end_ts=$(date +%s)
echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds"
break
fi
sleep 1
done
return $result
}
wait_for_wrapper()
{
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
if [[ $QUIET -eq 1 ]]; then
timeout $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
else
timeout $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
fi
PID=$!
trap "kill -INT -$PID" INT
wait $PID
RESULT=$?
if [[ $RESULT -ne 0 ]]; then
echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT"
fi
return $RESULT
}
# process arguments
while [[ $# -gt 0 ]]
do
case "$1" in
*:* )
hostport=(${1//:/ })
HOST=${hostport[0]}
PORT=${hostport[1]}
shift 1
;;
--child)
CHILD=1
shift 1
;;
-q | --quiet)
QUIET=1
shift 1
;;
-s | --strict)
STRICT=1
shift 1
;;
-h)
HOST="$2"
if [[ $HOST == "" ]]; then break; fi
shift 2
;;
--host=*)
HOST="${1#*=}"
shift 1
;;
-p)
PORT="$2"
if [[ $PORT == "" ]]; then break; fi
shift 2
;;
--port=*)
PORT="${1#*=}"
shift 1
;;
-t)
TIMEOUT="$2"
if [[ $TIMEOUT == "" ]]; then break; fi
shift 2
;;
--timeout=*)
TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
CLI="$@"
break
;;
--help)
usage
;;
*)
echoerr "Unknown argument: $1"
usage
;;
esac
done
if [[ "$HOST" == "" || "$PORT" == "" ]]; then
echoerr "Error: you need to provide a host and port to test."
usage
fi
TIMEOUT=${TIMEOUT:-15}
STRICT=${STRICT:-0}
CHILD=${CHILD:-0}
QUIET=${QUIET:-0}
if [[ $CHILD -gt 0 ]]; then
wait_for
RESULT=$?
exit $RESULT
else
if [[ $TIMEOUT -gt 0 ]]; then
wait_for_wrapper
RESULT=$?
else
wait_for
RESULT=$?
fi
fi
if [[ $CLI != "" ]]; then
if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then
echoerr "$cmdname: strict mode, refusing to execute subprocess"
exit $RESULT
fi
exec $CLI
else
exit $RESULT
fi
/bin
/vendor
/typo3_src
/html/index.php
/html/typo3
/html/fileadmin/
/html/typo3conf/ext/*
/html/typo3conf/AdditionalConfiguration.php
/html/typo3conf/PackageStates.php
/html/typo3conf/l10n
/html/typo3temp/
/html/uploads/
!/html/typo3conf/ext/t3o*
{
"name": "t3o/typo3.org",
"description": "Website for TYPO3.org",
"minimum-stability": "stable",
"authors": [
{
"name": "t3o team",
"email": "maintenance@typo3.org"
}
],
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org"
}
],
"require": {
"typo3/cms": "^7.6",
"helhum/typo3-console": "4.0.0",
"dmitryd/typo3-realurl": "^2.1"
},
"config": {
"bin-dir": "bin"
},
"extra": {
"typo3/cms": {
"web-dir": "html"
},
"helhum/typo3-console": {
"install-binary": true,
"install-extension-dummy": false
}
}
}
This diff is collapsed.
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = 'ter\.typo3\.127\.0\.0\.1\.xip\.io';
\ No newline at end of file
<?php
return [
'BE' => [
'debug' => true,
'explicitADmode' => 'explicitAllow',
'installToolPassword' => '$P$CazKq40MU77Uxes/HLdT4p9y66umtd.',
'loginSecurityLevel' => 'rsa',
],
'DB' => [
'database' => 't3o',
'host' => 'db',
'password' => 'k6mdcMp0MATlzKAE1RW6qFmmilqt2HNkQhbVgztu',
'port' => 3306,
'username' => 't3o',
],
'EXT' => [
'extConf' => [
'rsaauth' => 'a:1:{s:18:"temporaryDirectory";s:0:"";}',
'saltedpasswords' => 'a:2:{s:3:"BE.";a:4:{s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}s:3:"FE.";a:5:{s:7:"enabled";i:1;s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}}',
],
],
'FE' => [
'cHashIncludePageId' => true,
'debug' => true,
'loginSecurityLevel' => 'rsa',
],
'GFX' => [
'colorspace' => 'sRGB',
'im' => 1,
'im_mask_temp_ext_gif' => 1,
'im_path' => '/usr/bin/',
'im_path_lzw' => '/usr/bin/',
'im_v5effects' => 1,
'im_version_5' => 'im6',
'image_processing' => 1,
'jpg_quality' => '80',
],
'INSTALL' => [
'wizardDone' => [
'TYPO3\CMS\Install\Updates\AccessRightParametersUpdate' => 1,
'TYPO3\CMS\Install\Updates\BackendUserStartModuleUpdate' => 1,
'TYPO3\CMS\Install\Updates\Compatibility6ExtractionUpdate' => 1,
'TYPO3\CMS\Install\Updates\ContentTypesToTextMediaUpdate' => 1,
'TYPO3\CMS\Install\Updates\FileListIsStartModuleUpdate' => 1,
'TYPO3\CMS\Install\Updates\FilesReplacePermissionUpdate' => 1,
'TYPO3\CMS\Install\Updates\LanguageIsoCodeUpdate' => 1,
'TYPO3\CMS\Install\Updates\MediaceExtractionUpdate' => 1,
'TYPO3\CMS\Install\Updates\MigrateMediaToAssetsForTextMediaCe' => 1,
'TYPO3\CMS\Install\Updates\MigrateShortcutUrlsAgainUpdate' => 1,
'TYPO3\CMS\Install\Updates\OpenidExtractionUpdate' => 1,
'TYPO3\CMS\Install\Updates\PageShortcutParentUpdate' => 1,
'TYPO3\CMS\Install\Updates\ProcessedFileChecksumUpdate' => 1,
'TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate' => 1,
'TYPO3\CMS\Install\Updates\WorkspacesNotificationSettingsUpdate' => 1,
'TYPO3\CMS\Rtehtmlarea\Hook\Install\DeprecatedRteProperties' => 1,
'TYPO3\CMS\Rtehtmlarea\Hook\Install\RteAcronymButtonRenamedToAbbreviation' => 1,
],
],
'MAIL' => [
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i ',
],
'SYS' => [
'caching' => [
'cacheConfigurations' => [
'extbase_object' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend',
'groups' => [
'system',
],
'options' => [
'defaultLifetime' => 0,
],
],
],
],
'clearCacheSystem' => true,
'devIPmask' => '*',
'displayErrors' => 1,
'enableDeprecationLog' => 'file',
'encryptionKey' => '52fd0fa7b7337befc0840fd8ad8fd8868fc9d98f60ea9b6e737ce732448e80eb35d2662bc15d04eb523171ec727c1dee',
'exceptionalErrors' => 28674,
'isInitialDatabaseImportDone' => true,
'isInitialInstallationInProgress' => false,