Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker installation #1414

Closed
DavidHenryThoreau opened this issue Sep 21, 2023 · 22 comments
Closed

Docker installation #1414

DavidHenryThoreau opened this issue Sep 21, 2023 · 22 comments

Comments

@DavidHenryThoreau
Copy link

Do you have a docker-compose.yml in order to install NNTmux in a docker env easily ?

@ghost
Copy link

ghost commented Sep 21, 2023

You might want to check the folder called docker

@DavidHenryThoreau
Copy link
Author

Thanks, I've read this page https://github.com/NNTmux/newznab-tmux/tree/master/docker/8.2 , found some steps but no docker-compose.yml to docker compose pull && docker compose up -d

@ghost
Copy link

ghost commented Sep 21, 2023

The compose file is always in the root of the project.

@DavidHenryThoreau
Copy link
Author

Right, I'm gonna try :)

@DavidHenryThoreau
Copy link
Author

Can I install to ARM CPU ?

@ghost
Copy link

ghost commented Sep 21, 2023

Find out and let us know if you do. You'll need to make a new Dockerfile with all ARM tools.

Otherwise you should be able to run x86 images on ARM using emulation probably.

@AbdelatifAitBara
Copy link

@Rajdeep1311
Copy link

You can use my shell scripts to install, here is my repo: https://github.com/Rajdeep1311/DevOps_learnings.git

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 22, 2023

git clone https://github.com/NNTmux/newznab-tmux
cd newznab-tmux

echo 
"
DB_CONNECTION=mysql
DB_HOST=mariadb 
DB_PORT=3306
DB_ROOTPASSWORD=rootpwd
DB_SOCKET=
DB_USERNAME=mariadb
DB_PASSWORD=mariadb
DB_DATABASE=nntmux


MAIL_MAILER=smtp
MAIL_DRIVER=smtp 
MAIL_HOST=mailpit
MAIL_PORT=1025
MANTICORESEARCH_HOST=manticore 
ELASTICSEARCH_HOST=elasticsearch
" > .env 

chmod +x sail
mv docker-compose.yml.dist docker-compose.yml
./sail build --no-cache
./sail up -d

./sail artisan nntmux:install
Warning: require_once(/var/www/html/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/bootstrap/autoload.php on line 3 Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/bootstrap/autoload.php:3 Stack trace: #0 /var/www/html/public/index.php(3): require_once() #1 {main} thrown in /var/www/html/bootstrap/autoload.php on line 3

@ghost
Copy link

ghost commented Sep 22, 2023

run sail composer install before nntmux:install

@DavidHenryThoreau
Copy link
Author

debian:/home/debian/newznab-tmux# ./sail composer install
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "COMPOSER_AUTH" variable is not set. Defaulting to a blank
string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "COMPOSER_AUTH" variable is not set. Defaulting to a blank
string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_TZ" variable is not set. Defaulting to a blank string. 
Installing dependencies from lock file (including require-dev)
  Verifying lock file contents can be installed on current platform.
  Package operations: 263 installs, 0 updates, 0 removals

  In Filesystem.php line 255:
                                                                            
    /var/www/html/vendor/php-http does not exist and could not be created.                                                                            

@ghost
Copy link

ghost commented Sep 23, 2023

Fix the warnings first. Then look at file/user permissions.

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 25, 2023

The files are owned by root in the container, I still have file/user permissions. :

root@debian-12:~/newznab-tmux# docker compose exec -u sail laravel.test  bash
sail@f45f99fd6316:/var/www/html$ ll /var/www/html/vendor/laravel/php-http
ls: cannot access '/var/www/html/vendor/laravel/php-http': No such file or directory
sail@f45f99fd6316:/var/www/html$ ll|grep sail
-rwxr-xr-x  1 root root  15624 Sep 21 16:08 sail*

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 25, 2023

Can you publish a built version of laravel.test image ?
I'd like to use NNTmux in production and I don't want to build it on production :)

@ghost
Copy link

ghost commented Sep 25, 2023

It’s about permissions outside of the container. The files sit on your local filesystem.

Also this is a development environment, not to be ran in production.

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 25, 2023

Right, How can I run it in production ? I'm using docker-compose for all others production applications

@ghost
Copy link

ghost commented Sep 25, 2023

I would run it bare metal.

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 25, 2023

What do you think about the idea of publishing a built version of laravel docker's image (x86, arm) it might be easy to deploy it in production even in bare metal ?

For example : https://hub.docker.com/r/fekhoo/newznab

@DariusIII
Copy link
Member

@DavidHenryThoreau
Copy link
Author

DavidHenryThoreau commented Sep 28, 2023

Yes, some images already exist but seems outdated and not for arm platform only for x86.

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 29, 2023
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants