Skip to content

Instantly share code, notes, and snippets.

View VugarAhmadov's full-sized avatar
🎯
Focusing

Vugar Ahmadov VugarAhmadov

🎯
Focusing
View GitHub Profile
@VugarAhmadov
VugarAhmadov / gen-ssh-keys
Created July 11, 2020 20:36 — forked from triztian/gen-ssh-keys.md
DigitalOcean Generate SSH keys
# Adding SSH Keys to Droplets
## How it Works
You can add SSH keys to DigitalOcean which can then be selected during the droplet create process to add the selected SSH keys under the root user.
When using SSH keys a root password will no longer be set as SSH keys will be used as the preferred method of access.
We do not manage the server after creation, so editing, adding, or removing SSH keys from the SSH interface will not affect any of the stored keys on droplets that you have created.
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
version: "3.7"
services:
traefik:
image: traefik:latest
restart: always
container_name: traefik
ports:
- "80:80"
command: