Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
a0f1d39c
Commit
a0f1d39c
authored
Jul 15, 2017
by
Arian Acosta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added bash option
parent
6bed8d14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
sync.sh
sync.sh
+19
-0
No files found.
sync.sh
View file @
a0f1d39c
#!/bin/bash
# This shell script is an optional tool to simplify
# the installation and usage of laradock with docker-sync.
# To run, make sure to add permissions to this file:
# chmod 755 sync.sh
# Usage:
# Install docker-sync: ./sync.sh install
# Start workspace with nginx and mysql: ./sync.sh up nginx mysql
# Open bash inside the workspace: ./sync.sh bash
# Stop workspace: ./sync.sh down
# Force sync: ./sync.sh trigger
# Clean synced files: ./sync.sh clean
# prints colored text
print_style
()
{
...
...
@@ -26,6 +40,7 @@ display_options () {
print_style
" install"
"success"
;
printf
"
\t\t
Installs docker-sync gem on the host machine.
\n
"
;
print_style
" up [services]"
"success"
;
printf
"
\t
Starts docker-sync and runs docker compose.
\n
"
;
print_style
" down"
"success"
;
printf
"
\t\t\t
Stops containers and docker-sync.
\n
"
;
print_style
" bash"
"success"
;
printf
"
\t\t\t
Opens bash on the workspace
\n
"
;
print_style
" trigger"
"success"
;
printf
"
\t\t
Manually triggers the synchronization of files.
\n
"
;
print_style
" clean"
"warning"
;
printf
"
\t\t
Removes all files from the docker-sync container.
\n
"
;
}
...
...
@@ -56,6 +71,9 @@ elif [ "$1" == "install" ]; then
print_style
"Installing docker-sync
\n
"
"info"
;
gem
install
docker-sync
;
elif
[
"
$1
"
==
"bash"
]
;
then
docker-compose
exec
workspace bash
;
elif
[
"
$1
"
==
"trigger"
]
;
then
print_style
"Manually triggering sync between host and docker-sync container.
\n
"
"info"
;
docker-sync
sync
;
...
...
@@ -64,6 +82,7 @@ elif [ "$1" == "clean" ]; then
print_style
"Removing and cleaning up files from the docker-sync container.
\n
"
"warning"
;
docker-sync clean
;
else
print_style
"Invalid arguments.
\n
"
"danger"
;
display_options
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment