diff --git a/readme.md b/readme.md index a29f0b4..f16a7b7 100644 --- a/readme.md +++ b/readme.md @@ -1,11 +1,14 @@

Video meme generator

Generate subtitle and render it to a video

-

Requirements:

- + + + + + + + + +

Table structure (optional):

Process flow:

@@ -15,4 +18,85 @@
  • Slander
  • The Rock
  • Noot
  • - \ No newline at end of file + + + + + + + + + + + + + +

    Installation with Docker LEMP Stack:

    + +

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

    +
    +# ./docker-compose.yml
    +version: '3'
    +
    +services:
    +  app:
    +    image: adhocore/lemp:7.4
    +    # For different app you can use different names. (eg: )
    +    container_name: some-app
    +    volumes:
    +      # app source code
    +      - ./meme:/var/www/html
    +      # db data persistence
    +      - db_data:/var/lib/mysql
    +      # Here you can also volume php ini settings
    +      # - /path/to/zz-overrides:/usr/local/etc/php/conf.d/zz-overrides.ini
    +    ports:
    +      - 8080:80
    +    environment:
    +      MYSQL_ROOT_PASSWORD: supersecurepwd
    +      MYSQL_DATABASE: appdb
    +      MYSQL_USER: dbusr
    +      MYSQL_PASSWORD: securepwd
    +      # for postgres you can pass in similar env as for mysql but with PGSQL_ prefix
    +
    +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

    +
    +cd meme
    +git clone https://repo.gabrielkheisa.xyz/gabrielkheisa/meme-generator.git
    +git checkout docker
    +
    + +

    4. Bash into container

    +
    +docker exec -u root -t -i some-app /bin/bash
    +
    + +

    5. Login to MySQL as root with the password supersecurepwd

    +
    +mysql -u root -p
    +
    + +

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

    +
    +GRANT ALL PRIVILEGES ON meme.* TO 'dbuser'@'localhost' WITH GRANT OPTION;
    +exit;
    +
    + +

    7. Navigate to /var/www/html/meme-generator

    +
    +cd /var/www/html/meme-generator
    +
    + +

    8. Run the Python script

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