Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Fixed install issues
Browse files Browse the repository at this point in the history
Added docker-compose
  • Loading branch information
jkroepke committed Jul 30, 2017
1 parent 5cf1e86 commit c55934e
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 8 deletions.
36 changes: 36 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,36 @@
version: '2'
services:
web:
image: webdevops/php-apache-dev:ubuntu-16.04
depends_on:
- db
volumes:
- .:/app
environment:
DB_HOST: database
DB_USER: 2moons
DB_PASSWORD: 2moons
DB_NAME: 2moons
ADMIN_NAME: admin
ADMIN_PASSWORD: admin
ADMIN_MAIL: mail@example.com
ports:
- 8080:80
networks:
- 2moons
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: 2moons
MYSQL_USER: 2moons
MYSQL_PASSWORD: 2moons
ports:
- 3306:3306
networks:
2moons:
aliases:
- database

networks:
2moons:
Empty file removed includes/FIRST_INSTALL
Empty file.
2 changes: 1 addition & 1 deletion includes/common.php
Expand Up @@ -73,7 +73,7 @@
return;
}

if(!file_exists('includes/config.php')) {
if(!file_exists('includes/config.php') || filesize('includes/config.php') === 0) {
HTTP::redirectTo('install/index.php');
}

Expand Down
12 changes: 9 additions & 3 deletions install/index.php
Expand Up @@ -388,7 +388,7 @@
$template->assign(array(
'host' => getenv('DB_HOST'),
'user' => getenv('DB_USER'),
'password' => getenv('DB_USER'),
'password' => getenv('DB_PASSWORD'),
'dbname' => getenv('DB_NAME'),
));
$template->show('ins_form.tpl');
Expand Down Expand Up @@ -503,12 +503,13 @@
$db->query(str_replace(array(
'%PREFIX%',
'%VERSION%',
'%REVISION%'
'%REVISION%',
'%DB_VERSION%'
), array(
DB_PREFIX,
$installVersion,
$installRevision,
$installSQL
DB_VERSION_REQUIRED
), $installSQL));

$config = Config::get(Universe::current());
Expand Down Expand Up @@ -543,6 +544,11 @@
}
break;
case 7:
$template->assign(array(
'name' => getenv('ADMIN_NAME'),
'password' => getenv('ADMIN_PASSWORD'),
'mail' => getenv('ADMIN_MAIL'),
));
$template->show('ins_acc.tpl');
break;
case 8:
Expand Down
2 changes: 1 addition & 1 deletion install/install.sql
Expand Up @@ -939,7 +939,7 @@ INSERT INTO `%PREFIX%cronjobs` (`cronjobID`, `name`, `isActive`, `min`, `hours`,
(NULL, 'tracking', 1, FLOOR(RAND() * 60), FLOOR(RAND() * 24), '*', '*', '0', 'TrackingCronjob', 0, NULL);

INSERT INTO `%PREFIX%system` (`dbVersion`) VALUES
(2);
(%DB_VERSION%);

INSERT INTO `%PREFIX%ticket_category` (`categoryID`, `name`) VALUES
(1, 'Support');
Expand Down
6 changes: 3 additions & 3 deletions styles/templates/install/ins_acc.tpl
Expand Up @@ -8,15 +8,15 @@
<table class="req">
<tr>
<td class="transparent left"><p>{$LNG.step4_admin_name}</p><p class="desc">{$LNG.step4_admin_name_desc}</p></td>
<td class="transparent"><input type="text" name="username" value="" size="30"></td>
<td class="transparent"><input type="text" name="username" value="{$name}" size="30"></td>
</tr>
<tr>
<td class="transparent left"><p>{$LNG.step4_admin_pass}</p><p class="desc">{$LNG.step4_admin_pass_desc}</p></td>
<td class="transparent"><input type="password" name="password" value="" size="30"></td>
<td class="transparent"><input type="password" name="password" value="{$password}" size="30"></td>
</tr>
<tr>
<td class="transparent left"><p>{$LNG.step4_admin_mail}</p></td>
<td class="transparent"><input type="text" name="email" value="" size="30"></td>
<td class="transparent"><input type="text" name="email" value="{$mail}" size="30"></td>
</tr>
<tr class="noborder">
<td colspan="2" class="transparent"><input type="submit" name="next" value="{$LNG.continue}"></td>
Expand Down

0 comments on commit c55934e

Please sign in to comment.