- Install pre-requisities
sudo apt-get install build-essential tcl
- Install Redis
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
#!/bin/bash | |
# Requires azure-cli to be installed | |
source $HOME/.profile | |
echo "backing up media dir..." | |
tar -zcf /tmp/media.gz /var/www/app/shared/media |
#!/bin/bash | |
# Requires azure-cli to be installed | |
source $HOME/.profile | |
if [ "${POSTGRES_HOST}" = "" ]; then | |
if [ -n "${POSTGRES_PORT_5432_TCP_ADDR}" ]; then | |
POSTGRES_HOST=$POSTGRES_PORT_5432_TCP_ADDR | |
POSTGRES_PORT=$POSTGRES_PORT_5432_TCP_PORT |
upstream app { | |
server unix:///home/cloudnet/app/shared/sockets/puma.sock; | |
} | |
server { | |
server_name cloudnet.com www.cloudnet.com; | |
listen 80; | |
rewrite ^ https://www.cloudnet.com$request_uri? permanent; | |
} |
[Unit] | |
Description=Puma HTTP Server | |
After=network.target | |
# Uncomment for socket activation (see below) | |
# Requires=puma.socket | |
[Service] | |
# Foreground process (do not use --daemon in ExecStart or config.rb) | |
Type=simple |
[Unit] | |
Description=Sidekiq | |
After=network.target | |
[Service] | |
User=cloudnet | |
Group=cloudnet | |
WorkingDirectory=/home/cloudnet/app | |
EnvironmentFile=/home/cloudnet/app/.env.production | |
ExecStart=/bin/bash -lc 'bundle exec sidekiq -C config/sidekiq.yml' |
sudo apt-get install build-essential tcl
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
[Unit] | |
Description=Redis In-Memory Data Store | |
After=network.target | |
[Service] | |
User=redis | |
Group=redis | |
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
ExecStop=/usr/local/bin/redis-cli shutdown | |
Restart=always |
# Change to match your CPU core count | |
workers 8 | |
# Min and Max threads per worker | |
threads 4, 8 | |
app_dir = File.expand_path("../..", __FILE__) | |
shared_dir = "#{app_dir}/shared" | |
# Default to production |
[Unit] | |
Description=Puma HTTP Server | |
After=network.target | |
# Uncomment for socket activation (see below) | |
# Requires=puma.socket | |
[Service] | |
# Foreground process (do not use --daemon in ExecStart or config.rb) | |
Type=simple |
This is a quick step-by-step guide to install Cloud.net on a server using Docker.
Minimum requirements
Installation