From 96da75d2a9b0e72f488cf8555afc93eb05fbf739 Mon Sep 17 00:00:00 2001 From: Gabriel Kheisa <63294471+gabrielkheisa@users.noreply.github.com> Date: Wed, 26 Oct 2022 15:15:12 +0700 Subject: [PATCH] Update readme.md --- readme.md | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index 466085e..accf635 100644 --- a/readme.md +++ b/readme.md @@ -35,7 +35,9 @@

Installation with Docker LEMP Stack:

1. Create a file, named docker-compose.yml. Insert with these contents:

-
+
+
+```yaml
 # ./docker-compose.yml
 version: '3'
 
@@ -62,17 +64,18 @@ services:
 
 volumes:
   db_data: {}
-
+```

2. Then compose

 docker-compose up -d
 
-

3. Navigate to meme folder (volume), then clone my repo and change to docker branch

+

3. Navigate to meme folder (volume), then clone my repo, navigate to meme-generator and then change to docker branch

 cd meme
 git clone https://repo.gabrielkheisa.xyz/gabrielkheisa/meme-generator.git
+cd meme-generator
 git checkout docker
 
@@ -89,9 +92,23 @@ docker exec -u root -t -i some-app /bin/bash mysql -u root -p -

6. Create database meme, then allow dbusr to access it

+

6. Create table meme in appdb database, then allow dbusr to access it

-GRANT ALL PRIVILEGES ON meme.* TO 'dbuser'@'localhost' WITH GRANT OPTION;
+USE appdb;
+
+CREATE TABLE `meme` (
+	`id` INT(10) NOT NULL AUTO_INCREMENT,
+	`session` VARCHAR(20),
+	`status` INT(1),
+	`timestamp` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+	`value` TEXT,
+	PRIMARY KEY (`id`)
+);
+
+
+
+
+GRANT ALL PRIVILEGES ON appdb.* TO 'dbusr'@'localhost' WITH GRANT OPTION;
 exit;
 
@@ -104,8 +121,16 @@ cd /var/www/html/meme-generator
 apk add --no-cache python3 py3-pip
 
+
+apk add make automake gcc g++ subversion python3-dev
+apk add ffmpeg
+pip3 install --upgrade pip
+pip3 install mysql-connector-python==8.0.29
+pip3 install moviepy
+

9. Run the Python script, detach from screen by pressing Ctrl + A then Ctrl + D

 python3 renderDB.py
-
\ No newline at end of file + +

10. Open your browser, navigate to http://{your-ip}:8080/meme-generator/