This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backup-db: | |
docker exec -it db \ | |
bash -c "pg_dump -U $(POSTGRES_USER) -d $(POSTGRES_DB) > /tmp/clb.sql" | |
restore-dyntaxa-dump: | |
test -f clb.sql || curl -L --progress -o clb.sql \ | |
"https://nrmowncloud.nrm.se/owncloud/index.php/s/0tiY0uLW4wqQ9p7/download?path=%2F&files=clb_structure_and_data.dump" | |
docker cp clb.sql db:/tmp/clb.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have set up your system, so that you can run dns-docker and run into trouble. | |
Trouble: | |
$ sudo service docker restart | |
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. | |
Files you should look into: | |
(1) /etc/default/docker | |
The 2 lines starting with 'DOCKER_OPTS' should be commented-out | |
# Use DOCKER_OPTS to modify the daemon startup options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Github and Travis | |
#prereq for travis installation: | |
1. install travis-cli | |
1.1 ruby --version | |
-> gives 2.3 | |
(1.2 sudo apt-get install pkg-config) | |
1.2 sudo apt-get install build-essential | |
sudo apt-get install libffi-dev | |
#install travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER 'ink'@'localhost' IDENTIFIED BY 'ink'; | |
GRANT ALL PRIVILEGES ON inksdb.* To 'ink'@'localhost' IDENTIFIED BY 'ink'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2017-06-29 | |
mysql> select version(); | |
+-------------------------+ | |
| version() | | |
+-------------------------+ | |
| 5.7.18-0ubuntu0.16.04.1 | | |
+-------------------------+ | |
1 row in set (0,00 sec) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
push a branch: | |
git push -u origin <branch> , i.e git push -u origin issue8 | |
fetch only a branch: | |
git clone -b <branch> <repo>.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/mskyttner/specify-docker/blob/master/s6init.sql | |
example with multipled privileges: | |
create user if not exists 'xx'@'%' identified by 'xx'; | |
create user if not exists 'yy'@'%' identified by 'yy'; | |
grant select, insert, update, delete, lock tables, | |
alter, create, drop, | |
index, grant option on specify6.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file : users.csv ( put that file in .gitignore) | |
users.csv | |
user,password | |
gpg -c users.csv generates users.csv.gpg -> push to github | |
run script | |
#!/bin/bash | |
while IFS=, read user password | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/mskyttner/ala-docker/blob/master/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1: use gpg in the script, fetch psw from file does not work ... | |
Q2: use scp to cp the file to a remote location | |
info: mysqldump + tarring all the redmine_files ... becomes an tar. | |
#!/bin/bash | |
source .env/.env.db | |
TARGET=tst | |
NOW=`date +"%Y-%m-%d"` | |
TARGET_DIR=$TARGET/$NOW |