Commit 35f951e1 authored by Sascha Marcel Schmidt's avatar Sascha Marcel Schmidt
Browse files

moves environment variables to .env file, adds typo3 setup make task

parent 04662bcd
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
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
init:
$(MAKE) composer-install
stop:
$(DOCKER_COMPOSE) stop
kill:
......@@ -22,3 +24,18 @@ composer-install:
$(COMPOSER) --working-dir=data/typo3 install
composer-update:
$(COMPOSER) --working-dir=data/typo3 up
install-typo3: up
@read -p "Wait for https://ter.typo3.localhost to to become available. [Enter]"
$(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
......@@ -3,20 +3,22 @@ services:
data:
image: busybox
volumes:
- ./:/src
- ./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
- ./data/etc/php/entrypoint.d/user/:/usr/local/entrypoint.d/user/
db:
image: mariadb:10
environment: &db_env
MYSQL_USER: 't3o'
MYSQL_DATABASE: 't3o'
MYSQL_PASSWORD: 'k6mdcMp0MATlzKAE1RW6qFmmilqt2HNkQhbVgztu'
MYSQL_ROOT_PASSWORD: 'uf5c92eCULghtfdEdqH0hsfvnPSuEY7cnPKk5MAz'
MYSQL_USER: "${DATABASE_USER}"
MYSQL_PASSWORD: "${DATABASE_USER_PASSWORD}"
MYSQL_DATABASE: "${DATABASE_NAME}"
MYSQL_ROOT_PASSWORD: "${DATABASE_ROOT_PASSWORD}"
volumes_from:
- data
......@@ -38,8 +40,9 @@ services:
image: torvitas/php-fpm:7
environment:
<<: *db_env
TYPO3_CONTEXT: 'Development'
TYPO3_CONTEXT: "${TYPO3_CONTEXT}"
WEB_ROOT: '/var/www/'
TYPO3_SITENAME: 'TYPO3 Extension Repository'
volumes_from:
- data
working_dir: /var/www
......
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