Advertisement
Spelendora

Untitled

Jul 5th, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.14 KB | None | 0 0
  1. root@vscale-redmine251:~# cat inst_docker_redmine_mysql
  2. #!/bin/bash
  3. docker pull sameersbn/redmine:2.5.3-1
  4. docker pull sameersbn/mysql:latest
  5. mkdir -p /opt/redmine
  6. mkdir -p /opt/redmine/mysql
  7. mkdir -p /opt/redmine/data
  8. root@vscale-redmine251:~# cat d_mysql
  9. #!/bin/bash
  10.  
  11. docker run --name=mysql -it \
  12. -e 'DB_NAME=redmine' -e 'DB_USER=redmine' -e 'DB_PASS=password' \
  13. -v /opt/redmine/mysql:/var/lib/mysql \
  14. -p 3306:3306 -d \
  15. sameersbn/mysql:latest
  16. root@vscale-redmine251:~# cat d_cp_mysql
  17. #!/bin/bash
  18. #docker cp -i files/backup.sql mysql:/home/
  19. #docker exec -i -t  mysql /bin/bash -c  mysql -u redmine -ppassword redmine < /home/backup.sql'
  20. docker exec -i mysql mysql -h 127.0.0.1 -P 3306 -uredmine -ppassword redmine < files/backup.sql
  21. root@vscale-redmine251:~# cat d_redmine
  22. #!/bin/bash
  23.  
  24. docker run --name=redmine -it \
  25. -p 10080:80 \
  26. -p 10443:443 \
  27. --env='REDMINE_PORT=10080' \
  28. --link mysql:mysql \
  29. -v /var/run/docker.sock:/run/docker.sock \
  30. -v /opt/redmine/data:/home/redmine/data \
  31. -d sameersbn/redmine:2.5.3-1
  32. root@vscale-redmine251:~# cat d_cp_redmine
  33. #!/bin/bash
  34. cp -r ./files/2* /opt/redmine/data/files/
  35. root@vscale-redmine251:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement