Getting up and running on a server takes only a few minutes. Once you have logged in using SSH, follow these steps to get it up and running on an Ubuntu server.
Install Docker Compose by running the following commands:
# Install Docker Composemkdir-p~/.docker/cli-plugins/curl-SLhttps://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64-o~/.docker/cli-plugins/docker-composechmod+x~/.docker/cli-plugins/docker-composesudochown $USER /var/run/docker.sock# Verify that Docker Compose is installeddockercomposeversion
Step 2:
Install Nginx and connect your domain to your Server
First, install Nginx
sudoaptinstallnginx
2. Then open the default site config file
sudonano/etc/nginx/sites-available/default
3. Remove everything inside the location brackets and add proxies. Note: if localhost does not work use ip address from your droplet.
Above the location we have server_name_;. Set the server name to your domain name if you want to use a domain name for this app. It should look like this:
server_name serpbear.mydomain.com
Exit and save: Ctrl+X & Y
Check so nginx is configured properly sudo nginx -t It should say something like the test is successful
Now restart the service sudo service nginx restart
Step 3
Add SSL for your domain following these commands
Step 4:
Enable Firewall:
Step 5:
Create a new directory called serpbear and create a docker-compose.yaml file with the following content:
Change Environment Variables to your needs. The Details of the Environment Variables can be found here.
Step 6:
From the same directory, run the container using the following Command:
Updating the App
When there is a new version, and you want to update your instance of the app, navigate to the serpbear directory and run the following: