Website generation with Couscous

This commit is contained in:
Milos Stojanovic
2019-06-18 16:07:37 +02:00
parent f5e2553396
commit 917863b208
4 changed files with 20 additions and 8 deletions

View File

@@ -101,8 +101,18 @@
<section class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10"> <section class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10">
<h2 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h2> <h2 id="default-auth-service">Default Auth service</h2>
<p>You can store your users inside mysql database (default is json file).</p> <p>By default, users are stored in json file. For some use-cases, this is more than enough. It also makes this app lightweight since no database is required.</p>
<p>Default handler accepts only file name parameter. This file should be writable by the server.</p>
<pre><code> 'Filegator\Services\Auth\AuthInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Auth\Adapters\JsonFile',
'config' =&gt; [
'file' =&gt; __DIR__.'/private/users.json',
],
],
</code></pre>
<h2 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h2>
<p>You can use mysql database to store your users.</p>
<p>First, create a table <code>users</code> with this sql:</p> <p>First, create a table <code>users</code> with this sql:</p>
<pre><code>CREATE TABLE `users` ( <pre><code>CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT, `id` int(10) NOT NULL AUTO_INCREMENT,
@@ -131,6 +141,7 @@ VALUES
'database' =&gt; 'filegator', 'database' =&gt; 'filegator',
], ],
],</code></pre> ],</code></pre>
<p>Don't forget to enter correct mysql username, password, and database.</p>
</section> </section>
</div> </div>

View File

@@ -114,7 +114,7 @@
], ],
],</code></pre> ],</code></pre>
<h2 id="frontend-tweaks">Frontend tweaks</h2> <h2 id="frontend-tweaks">Frontend tweaks</h2>
<p>To change default color scheme and other options, edit <code>/frontend/App.vue</code> and recompile with npm.</p> <p>To change default color scheme and other options, edit <code>/frontend/App.vue</code>. When you're done, recompile with <code>npm run build</code>.</p>
<pre><code>// Primary color <pre><code>// Primary color
$primary: #34B891; $primary: #34B891;
$primary-invert: findColorInvert($primary); $primary-invert: findColorInvert($primary);

View File

@@ -101,7 +101,8 @@
<section class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10"> <section class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10">
<h2 id="project-setup-for-development">Project setup for development</h2> <h2 id="project-setup-for-development-linux">Project setup for development (Linux)</h2>
<p>You must have <code>git</code>, <code>php</code>, <code>npm</code>, and <code>composer</code> installed.</p>
<pre><code>git clone git@github.com:filegator/filegator.git <pre><code>git clone git@github.com:filegator/filegator.git
cd filegator cd filegator
cp configuration_sample.php configuration.php cp configuration_sample.php configuration.php
@@ -110,14 +111,15 @@ sudo chmod -R 777 repository/
composer install composer install
npm install npm install
npm run build</code></pre> npm run build</code></pre>
<h2 id="compiles-and-hot-reloads-backend-and-frontend-on-ports-8081-and-8080">Compiles and hot-reloads (backend and frontend on ports 8081 and 8080)</h2> <h2 id="compiles-and-hot-reloads">Compiles and hot-reloads</h2>
<p>The following command will launch backend and frontend on ports 8081 and 8080:</p>
<pre><code>npm run serve</code></pre> <pre><code>npm run serve</code></pre>
<p>Once everything is ready visit: <code>http://localhost:8080</code></p> <p>Once everything is ready visit: <code>http://localhost:8080</code></p>
<h2 id="run-tests-amp-static-analysis">Run tests &amp; static analysis</h2> <h2 id="run-tests-amp-static-analysis">Run tests &amp; static analysis</h2>
<pre><code>vendor/bin/phpunit <pre><code>vendor/bin/phpunit
vendor/bin/phpstan analyse ./backend</code></pre> vendor/bin/phpstan analyse ./backend</code></pre>
<h2 id="deployment">Deployment</h2> <h2 id="deployment">Deployment</h2>
<p>Set the website document root to <code>/dist</code> directory.</p> <p>Set the website document root to <code>/dist</code> directory. This is also known as 'public' folder.</p>
</section> </section>
</div> </div>

View File

@@ -110,11 +110,10 @@
<li>Latest: <a href="https://github.com/filegator/static/raw/master/builds/filegator_v7.0.0-RC2.zip">v7.0.0-RC2</a></li> <li>Latest: <a href="https://github.com/filegator/static/raw/master/builds/filegator_v7.0.0-RC2.zip">v7.0.0-RC2</a></li>
<li>Unzip files and upload them to your PHP server</li> <li>Unzip files and upload them to your PHP server</li>
<li>Make sure you webserver can read and write to <code>/storage</code> and <code>/private</code> folders</li> <li>Make sure you webserver can read and write to <code>/storage</code> and <code>/private</code> folders</li>
<li>Set the website document root to <code>/dist</code> directory</li> <li>Set the website document root to <code>/dist</code> directory. This is also known as 'public' folder.</li>
<li>Visit web page, if something goes wrong check <code>/private/logs/app.log</code></li> <li>Visit web page, if something goes wrong check <code>/private/logs/app.log</code></li>
<li>Login with default credentials <code>admin/admin123</code></li> <li>Login with default credentials <code>admin/admin123</code></li>
<li>Change default admin's password</li> <li>Change default admin's password</li>
<li>Adjust <code>configuration.php</code> file</li>
</ul> </ul>
</section> </section>