Moved docker default passwords to .env

This commit is contained in:
Roman 2024-04-23 21:51:07 +02:00
parent 7f0290ba05
commit c13516c085
5 changed files with 10 additions and 10 deletions

1
.gitignore vendored Normal file

@ -0,0 +1 @@
.env

@ -121,14 +121,13 @@ class Settings {
// rate limiting
$settings->redisPort = 6379;
$settings->redisPassword = "";
if (isDocker()) {
$settings->rateLimitingEnabled = true;
$settings->redisHost = "webbase-redis";
$settings->redisPassword = "webbase-redis";
} else {
$settings->rateLimitingEnabled = false;
$settings->redisHost = "";
$settings->redisPassword = "";
}
return $settings;

@ -710,14 +710,13 @@ namespace Documents\Install {
if (isDocker()) {
$defaultHost = "db";
$defaultUsername = "root";
$defaultPassword = "webbasedb";
$defaultDatabase = "webbase";
} else {
$defaultHost = "localhost";
$defaultUsername = "";
$defaultPassword = "";
$defaultDatabase = "";
}
$defaultPassword = "";
$views = array(
self::CHECKING_REQUIREMENTS => array(

@ -31,9 +31,10 @@ I actually don't know what i want to implement here. There are quite to many CMS
3. Open the webapp in your browser and follow the installation guide
### Docker Installation
1. `docker-compose build`
2. `docker-compose up`
3. Open the webapp in your browser and follow the installation guide
1. Create an `.env` file with `MYSQL_ROOT_PASSWORD` AND `REDIS_PASSWORD`
2. `docker-compose build`
3. `docker-compose up`
4Open the webapp in your browser and follow the installation guide
3a. Since the docker runs as user www-data (33), the following permissions are recommended and at least necessary for the installation process:
```
chown -R :33 .

@ -18,8 +18,8 @@ services:
ports:
- '3306:3306'
environment:
- "MYSQL_ROOT_PASSWORD=webbasedb"
- "MYSQL_DATABASE=webbase"
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: webbase
php:
container_name: webbase-php
volumes:
@ -35,7 +35,7 @@ services:
image: redis:latest
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass webbase-redis
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- cache:/data
volumes: