Giter Club home page Giter Club logo

server-automation's Introduction

Server Automation πŸš€

Scripts to automate your daily work in bash scripting!️

🚧 This is a work in progress project

Video Tutorials

youtube

Instalation using easy-server

https://youtu.be/lABtNXuHYdc

We will update the youtube channel with more videos

How to start πŸ”°

shell script

  1. Make sure NGINX Proxy is running

Please check NGINX Proxy Automation for more details.

You will need the proxy running to run some scripts in this project

  1. Clone this repository using the option --recurse-submodules ⚠
git clone --recurse-submodules https://github.com/evertramos/server-automation server-automation 

We use basescript πŸ›°

  1. Create .env file
cd server-automation && cp .env.example .env

Make sure your file path where you cloned this project (item 2) and proxy (item 1) are correct.

  1. Start new site!

Go to wordpress folder, create .env file and run new site script!

cd wordpress && cp .env.example .env && ./new-site.sh --new-url PUT_HERE_YOUR_DOMAIN.com --disable-letsencrypt --skip-docker-image-check

In this item we will use Docker WordPress version number 'v0.6' for now.

If you want to have Lets Encrypt running, please inform the correct email address in ./server-automation/wordpress/.env file and remove --disable-letsencrypt option from the line above.

Done! 🏁

Check the domain in the browser and install your new WordPress site!

Your domain url, used in the option --new-url above, must have the DNS correctly pointing to your server.

Contribute

image image

server-automation's People

Contributors

evertramos avatar lukassos avatar

Stargazers

 avatar  Vivek Rp avatar Navjot Singh avatar  avatar Carlos avatar Dima Gunkin avatar Ryan Rubush avatar Nikita Borisov avatar Abu Talha avatar Memory avatar  avatar  avatar Mark Babakov avatar Daoxyz avatar noroot avatar Matthew McAchran avatar Thugger069 avatar  avatar  avatar Jeremy Krohnfeldt avatar Nick Krzemienski avatar  avatar maldit0 avatar vanlab.co avatar Lucky | Sharma Secure Services Inc avatar Joshua Canfield avatar Christopher Coffee avatar Dark~Star avatar Shankar Thiyagaraajan avatar IvΓ‘n HernΓ‘ndez Cazorla avatar  avatar Amadou Ba avatar cocoonk1d avatar Sravankumar Veerapu avatar Jan avatar  avatar Charith Madhuranga avatar  avatar Mars avatar

Watchers

 avatar

server-automation's Issues

env_update_variable error on wordpress/new-site.sh

Hi, when running the wordpress/new-site.sh I get the following output:

βœ” success Function 'env_update_variable'
✘ ERROR   You must inform the required argument(s) to the function: 'env_update_variable' 
   Replace string: DOCKER_WORDPRESS_MYSQL_DATABASE
The above output is shortened. The full output is underneath this drop down.
⚑ Start execution '/home/ubuntu/server/server-automation/wordpress/new-site.sh --yes':
 βœ” success Function 'check_local_env_file'
 βœ” success Function 'check_docker'
 βœ” success Function 'check_running_script'
 βœ” success Function 'starts_initial_check'
 βœ” success Function 'check_server_automation_env_file_exists'
 βœ” success Function 'check_folder_exists'
 ? question Please enter the URL for the Site:mytestsite.be
 βœ” success Function 'common_read_user_input'
 βœ” success Function 'domain_get_domain_from_url'
 βœ” success Function 'common_generate_random_string'
 βœ” success Function 'check_folder_exists'
 βœ” success Function 'common_create_folder'
 βœ” success Function 'git_clone_repo'
 βœ” success Function 'domain_get_main_name_from_url'
 βœ” success Function 'common_generate_random_string'
 βœ” success Function 'docker_check_container_is_running'
 βœ” success Function 'docker_check_container_is_running'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 βœ” success Function 'env_update_variable'
 ✘ ERROR   You must inform the required argument(s) to the function: 'env_update_variable' 
   Replace string: DOCKER_WORDPRESS_MYSQL_DATABASE

Any ideas on how to resolve this error?

remote db management

Could it be possible to expose the db port ( port 3306 for mysql) to permit remote db management based for example on a (y/N) and a 'port number?' user input when running new-site.sh ?

Issue on installing script

Hi, I would like to use the server-automation to automatize the database backup of all my containers (wordpress and other apps).

I have cloned the repository and then within the cloned directory I changed the .env file setting the home path.
When I execute this command: ./backup.sh I get:

 Start execution '/home/john/docker/server-automation/backup/backup.sh ':
 βœ” success Function 'check_docker'
 βœ” success Function 'check_running_script'
 βœ” success Function 'starts_initial_check'
 βœ” success Function 'check_server_automation_env_file_exists'
 ✘ ERROR   Folder '/home/john/server-automation/sites' does not exist

I also noticed that the youtube video is outdate and the wiki link point to a 404.
Could you please help me to configure this?

Error establishing a database connection. When using Wordpress 6.2

Hi there and thanks for the amazing work you've done.

When using this in my .env:

#Site image
SITE_IMAGE=wordpress
SITE_VERSION=6.2

The WP cli doesn't work.

I'm don't know how to troubleshoot further. I ran into the problem when trying to use the update site name script provided in the wordpress folder.

I may have tracked it down to the Wordpress version. It works when I use 4.6 for the site version.

Any pointers on how to troubleshoot would be awesome!

Thanks again.

edit:
The output i get when trying to run wp.sh is: (I replaced my domain with "site" in the following)

...:/home/root/server/sites/dev2.site.org/compose# ./wp.sh
/snap/docker/2746/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
from cryptography.hazmat.backends import default_backend
Creating site-m0dff_wpcli_run ... done
Error: Error establishing a database connection.
ERROR: 1

new-site.sh

just a suggestion:
it will may be more 'user friendly' to change line 601 in new-site.sh
LOCAL_MYSQL_USER=${LOCAL_SITE_NAME:1:10}"_user"
with
LOCAL_MYSQL_USER=${LOCAL_SITE_NAME:0::10}"_user"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.