Create file /etc/systemd/system/[email protected]
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service| #!/bin/bash | |
| ## By Hebert F. Barros 2019 | |
| ## Removing any apt ## crashes | |
| sudo rm /var/lib/dpkg/lock-frontend ; sudo rm /var/cache/apt/archives/lock ; | |
| sudo apt-get update | |
| echo 'installing curl' | |
| sudo apt install curl -y |
| [Unit] | |
| Description=Advanced Geolocation store | |
| After=network.target | |
| Documentation=http://tile38.com/documentation/, man:redis-server(1) | |
| [Service] | |
| Type=forking | |
| ExecStart=/srv/geodb/tile38-server | |
| PIDFile=/var/run/tile38/tile38-server.pid | |
| TimeoutStopSec=0 |
| redis_cache: redis-server config/redis_cache.conf | |
| redis_socketio: redis-server config/redis_socketio.conf | |
| redis_queue: redis-server config/redis_queue.conf | |
| web: bench serve --port 8000 | |
| socketio: /usr/bin/node apps/frappe/socketio.js | |
| custom_app: /usr/bin/node apps/custom_app/custom_node.js | |
| watch: bench watch | |
| schedule: bench schedule | |
| worker_short: bench worker --queue short |
Create file /etc/systemd/system/[email protected]
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service| #/!bin/bash | |
| # update | |
| apt update | |
| # apt -y upgrade | |
| adduser ash | |
| usermod -aG ash | |
| # install package management tools |
| #!/bin/bash | |
| # Run this as root | |
| # Configure docker repo | |
| apt-get update | |
| apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common |
| #!/bin/bash -x | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
| echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
| sudo apt update | |
| sudo apt install -y mongodb-org | |
| sudo systemctl enable mongod | |
| sudo vim /etc/mongod.conf | |
| -- change access config if necessary | |
| sudo systemctl start mongod |
| #!/bin/bash -x | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
| echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
| sudo apt update | |
| sudo apt install -y mongodb-org | |
| sudo systemctl enable mongod | |
| sudo vim /etc/mongod.conf | |
| -- change access config if necessary | |
| sudo systemctl start mongod |
| # | |
| # | |
| # | |
| # | |
| #!/bin/bash | |
| #mkdir -p /root/.ssh | |
| #chmod 600 /root/.ssh | |
| #chmod 700 /root/.ssh/authorized_keys |
| #!/bin/bash | |
| echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process." | |
| read USERNAME | |
| if [ -z "$USERNAME" ] ; then | |
| echo "Exiting... Done." | |
| exit | |
| else | |
| echo "Adding user to 'sudo' group..." |