Skip to content

Commit 4e9b2ce

Browse files
committed
#105 First draft definition for docker-sync
1 parent 6bc99d0 commit 4e9b2ce

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

docker-compose-dev.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '2.1'
2+
3+
services:
4+
php:
5+
volumes:
6+
- devilbox-intranet-sync:/var/www/default:nocopy
7+
- devilbox-data-www-sync:/shared/httpd:nocopy
8+
httpd:
9+
volumes:
10+
- devilbox-intranet-sync:/var/www/default:nocopy
11+
- devilbox-data-www-sync:/shared/httpd:nocopy
12+
13+
volumes:
14+
# docker-sync managed volumes
15+
devilbox-intranet-sync:
16+
external: true
17+
devilbox-data-www-sync:
18+
external: true

docker-sync.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
version: '2'
2+
3+
4+
options:
5+
# The path to devilbox docker-compose.yml file
6+
compose-file-path: 'docker-compose.yml'
7+
8+
# The path to your custom docker-compose-dev.yml file
9+
compose-dev-file-path: 'docker-compose-dev.yml'
10+
11+
12+
syncs:
13+
# ------------------------------------------------------------
14+
# Devilbox Intranet
15+
# ------------------------------------------------------------
16+
devilbox-intranet-sync:
17+
# which folder to watch / sync from - you can use tilde (~), it will get expanded.
18+
# Be aware that the trailing slash makes a difference
19+
# if you add them, only the inner parts of the folder gets synced, otherwise the parent folder
20+
# will be synced as top-level folder
21+
src: '${DEVILBOX_PATH}/.devilbox/www/'
22+
23+
# this does not user groupmap but rather configures the server to map
24+
# optional: usually if you map users you want to set the user id of your application
25+
# container here
26+
sync_userid: '${NEW_UID}'
27+
28+
# OS aware sync strategy, default to:
29+
# * native_osx under MacOS (native)
30+
# * unison under MacOS (docker-machine)
31+
# * native docker volume under linux
32+
#sync_strategy: 'unison'
33+
34+
# optional, a list of excludes. These patterns will not be synced see:
35+
# http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#ignore
36+
# for the possible syntax and see sync_excludes_type below
37+
sync_excludes: ['.gitignore', '.git/', '.idea/', '.vscode/']
38+
39+
# ------------------------------------------------------------
40+
# Devilbox Projects
41+
# ------------------------------------------------------------
42+
devilbox-data-www-sync:
43+
# which folder to watch / sync from - you can use tilde (~), it will get expanded.
44+
# Be aware that the trailing slash makes a difference
45+
# if you add them, only the inner parts of the folder gets synced, otherwise the parent folder
46+
# will be synced as top-level folder
47+
src: '${HOST_PATH_HTTPD_DATADIR}/'
48+
49+
# this does not user groupmap but rather configures the server to map
50+
# optional: usually if you map users you want to set the user id of your application
51+
# container here
52+
sync_userid: '${NEW_UID}'
53+
54+
# OS aware sync strategy, default to:
55+
# * native_osx under MacOS (native)
56+
# * unison under MacOS (docker-machine)
57+
# * native docker volume under linux
58+
#sync_strategy: 'unison'
59+
60+
# optional, a list of excludes. These patterns will not be synced see:
61+
# http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#ignore
62+
# for the possible syntax and see sync_excludes_type below
63+
sync_excludes: ['.gitignore', '.git/', '.idea/', '.vscode/']

0 commit comments

Comments
 (0)