docker-compose exec -T <mongodb_service_name> mongodump --archive --gzip --db <mongodb_database> > dump.gz
docker-compose exec -T mongorestore --archive --gzip < dump.gz
-- Basic | |
-- Retrieve everything from a table | |
SELECT * FROM cd.facilities; | |
-- Retrieve specific columns from a table | |
SELECT name, membercost FROM cd.facilities; | |
-- Control which rows are retrieved | |
SELECT * FROM cd.facilities WHERE membercost > 0; |
#!/bin/bash | |
# | |
# As detailed here: https://libertyseeds.ca/2017/07/10/A-Home-Based-Ubuntu-16-04-Production-Server-with-Salvaged-Equipment/ | |
# `sudo` Execute as `app` user | |
# | |
# Still have some permissions issues. Some folders/files end up belonging to `root`. Gets about halfway through `ruby` install | |
# | |
apt update | |
apt -y upgrade |
#!/bin/bash | |
# | |
# For Ubuntu 18.04 | |
# `sudo` Execute as `app` user | |
# | |
# Still have some permissions issues. Some folders/files end up belonging to `root`. Gets about halfway through `ruby` install | |
# | |
apt update | |
apt -y upgrade |
#!/bin/bash | |
# | |
# For Ubuntu 20.04 | |
# `sudo` Execute as `app` user | |
# | |
# Still have some permissions issues. Some folders/files end up belonging to `root` | |
# | |
apt update | |
apt -y upgrade |
#!/usr/bin/env bash | |
# | |
# For Ubuntu 22.04 | |
# | |
# Execute as `app` user: | |
# | |
# `sudo -u app /home/app/post-install-ubuntu-22.sh` | |
# | |
sudo apt update |