Commit 233a4bdd authored by Sascha Marcel Schmidt's avatar Sascha Marcel Schmidt
Browse files

dds docker configuration

parent 2d097895
DOCKER_COMPOSE="$$(pwd)/docker-compose.sh"
up:
$(DOCKER_COMPOSE) up -d
ps:
$(DOCKER_COMPOSE) ps
init:
$(MAKE) composer-install
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:
$(DOCKER_COMPOSE) run --rm --no-deps php composer install
open:
sleep 2s
xdg-open http://ter.typo3.localhost
# TYPO3 Extension Repository
## ter.typo3.org
## Quickstart
```
git clone https://git-t3o.typo3.org/t3o/ter.git
make init up open log
```
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;
}
.DS_Store
.idea
bin
index.php
nbproject
vendor
typo3
typo3_src
html/index.php
html/typo3
html/fileadmin/_processed_
html/fileadmin/_temp_
html/fileadmin/files
html/fileadmin/user_upload
html/typo3conf/ext/**/*
html/typo3temp/
html/uploads/
ENABLE_INSTALL_TOOL
#!/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 "$@"
version: "2"
services:
data:
image: busybox
volumes:
- ./data/etc/db/conf.d:/etc/mysql/conf.d
- ./data/etc/db/entrypoint.d:/docker-entrypoint-initdb.d
- /tmp/composer/cache:/tmp/composer/cache
- /var/lib/mysql
- ./data/typo3:/var/www
- ./data/etc/nginx:/etc/nginx/conf.d
db:
image: mariadb:10
environment: &db_env
MYSQL_USER: 't3o'
MYSQL_DATABASE: 't3o'
MYSQL_PASSWORD: 'k6mdcMp0MATlzKAE1RW6qFmmilqt2HNkQhbVgztu'
MYSQL_ROOT_PASSWORD: 'uf5c92eCULghtfdEdqH0hsfvnPSuEY7cnPKk5MAz'
volumes_from:
- data
nginx:
image: nginx
networks:
- proxy
- default
environment:
VIRTUAL_HOST: ter.typo3.*
VIRTUAL_PORT: 80
CERT_NAME: default
volumes_from:
- data
depends_on:
- php
php:
image: torvitas/php-fpm:7
environment:
<<: *db_env
TYPO3_CONTEXT: 'Development'
WEB_ROOT: '/var/www/'
volumes_from:
- data
working_dir: /var/www
depends_on:
- db
log:
image: busybox:buildroot-2014.02
command: sh -c "tail -fn0 /var/www/html/typo3conf/*.log /var/www/html/typo3/typo3temp/logs/*"
volumes_from:
- php
networks:
proxy:
external: true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment