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
8af22b5b
Commit
8af22b5b
authored
Jul 15, 2017
by
Arian Acosta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finalizing changes
parent
7029118f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
sync-services.txt
sync-services.txt
+0
-1
sync.sh
sync.sh
+11
-10
No files found.
sync-services.txt
deleted
100644 → 0
View file @
7029118f
nginx mysql
\ No newline at end of file
sync.sh
View file @
8af22b5b
...
...
@@ -3,15 +3,19 @@
# This shell script is an optional tool to simplify
# the installation and usage of laradock with docker-sync.
# Make sure that the DOCKER_SYNC_STRATEGY is set in the .env
# DOCKER_SYNC_STRATEGY=native_osx # osx
# DOCKER_SYNC_STRATEGY=unison # windows
# To run, make sure to add permissions to this file:
# chmod 755 sync.sh
# U
sage
:
# U
SAGE EXAMPLE
:
# Install docker-sync: ./sync.sh install
# Start sync and services with nginx and mysql: ./sync.sh up nginx mysql
# Stop containers and sync: ./sync.sh down
# Open bash inside the workspace: ./sync.sh bash
# Force sync: ./sync.sh sync
trigger
# Force sync: ./sync.sh sync
# Clean synced files: ./sync.sh clean
# prints colored text
...
...
@@ -41,8 +45,8 @@ display_options () {
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 docker-sync.
\n
"
print_style
"
sync
"
"success"
;
printf
"
\t\t
Manually triggers the synchronization of files.
\n
"
print_style
" clean"
"
danger
"
;
printf
"
\t\t
Removes all files from docker-sync.
\n
"
}
if
[[
$#
-eq
0
]]
;
then
...
...
@@ -52,16 +56,13 @@ if [[ $# -eq 0 ]] ; then
fi
if
[
"
$1
"
==
"up"
]
;
then
value
=
$(
<sync-services.txt
)
echo
"
$value
"
print_style
"Initializing Docker Sync
\n
"
"info"
print_style
"May take a long time (15min+) the first run
\n
"
"info"
docker-sync start
;
print_style
"Initializing Docker Compose
\n
"
"info"
shift
# removing first argument
docker-compose
-f
docker-compose.yml
-f
docker-compose.sync.yml up
-d
$
value
docker-compose
-f
docker-compose.yml
-f
docker-compose.sync.yml up
-d
$
{
@
}
elif
[
"
$1
"
==
"down"
]
;
then
print_style
"Stopping Docker Compose
\n
"
"info"
...
...
@@ -77,7 +78,7 @@ elif [ "$1" == "install" ]; then
print_style
"Installing docker-sync
\n
"
"info"
gem
install
docker-sync
elif
[
"
$1
"
==
"
trigger
"
]
;
then
elif
[
"
$1
"
==
"
sync
"
]
;
then
print_style
"Manually triggering sync between host and docker-sync container.
\n
"
"info"
docker-sync
sync
;
...
...
@@ -88,4 +89,4 @@ else
print_style
"Invalid arguments.
\n
"
"danger"
display_options
exit
1
fi
fi
\ No newline at end of file
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