|
|
# Install & Setup
|
|
|
## Installation
|
|
|
1. `git clone` this repository: `git clone https://gitlab.sokoll.com/moritz/blog.git`
|
|
|
2. build the images: `sudo make docker-build-main` and `sudo make docker-build-api`
|
... | ... | @@ -13,6 +12,15 @@ dbhost=hostname |
|
|
user=username
|
|
|
pwd=password
|
|
|
```
|
|
|
also add a file called: `server.conf`
|
|
|
|
|
|
this file configures the port etc. and looks like this:
|
|
|
```
|
|
|
host=0.0.0.0
|
|
|
port=5001
|
|
|
debug=false
|
|
|
```
|
|
|
if `debug` is set to true and an error happens at runtime, you get a traceback to where this error comes from. Useful in development but not so useful in production
|
|
|
|
|
|
### Database
|
|
|
This Database needs a volume called `blogdb_content`.
|
... | ... | @@ -55,4 +63,21 @@ GRANT ALL ON pyblog.* to 'username'@'%'; |
|
|
and flush the privileges
|
|
|
```sql
|
|
|
FLUSH PRIVILEGES;
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
## Changing the database root users password
|
|
|
the docker-compose.yml sets the password on first launch.
|
|
|
|
|
|
To change it go into the running container by using: `sudo docker exec -ti blog_blogdb_1 bash`
|
|
|
|
|
|
There access the database by running: `mariadb -uroot -pexample`
|
|
|
|
|
|
The Execute following statements in the database:
|
|
|
```sql
|
|
|
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
|
|
|
```
|
|
|
and
|
|
|
```sql
|
|
|
FLUSH PRIVILEGES;
|
|
|
```
|
|
|
This should change the password |
|
|
\ No newline at end of file |