Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Koehler
rdmo-docker-compose
Commits
49d3b206
Commit
49d3b206
authored
Jul 05, 2019
by
Helfer
Browse files
Add restart policy.
parent
c653badc
Changes
3
Hide whitespace changes
Inline
Side-by-side
dc_master.yaml
View file @
49d3b206
...
...
@@ -31,6 +31,7 @@ services:
build
:
context
:
./apache
container_name
:
<GLOBAL_PREFIX>apache
restart
:
"
<RESTART_POLICY>"
ports
:
-
"
<FINALLY_EXPOSED_PORT>:80"
volumes
:
...
...
@@ -46,6 +47,7 @@ services:
build
:
context
:
./postgres
container_name
:
<GLOBAL_PREFIX>postgres
restart
:
"
<RESTART_POLICY>"
volumes
:
-
postgres:/var/lib/postgresql/data
env_file
:
...
...
@@ -55,6 +57,7 @@ services:
build
:
context
:
./rdmo
container_name
:
<GLOBAL_PREFIX>rdmo
restart
:
"
<RESTART_POLICY>"
depends_on
:
-
postgres
volumes
:
...
...
makefile
View file @
49d3b206
...
...
@@ -4,6 +4,7 @@ DC_TEMP="docker-compose.yaml"
VARS_ENV
=
$(
shell
if
[
-f
variables.local
]
;
then
echo
variables.local
;
else
echo
variables.env
;
fi
)
GLOBAL_PREFIX
=
$(
shell
cat
${CURDIR}
/
${VARS_ENV}
|
grep
-Po
"(?<=GLOBAL_PREFIX=
)
.*"
)
FINALLY_EXPOSED_PORT
=
$(
shell
cat
${CURDIR}
/
${VARS_ENV}
|
grep
-Po
"(?<=FINALLY_EXPOSED_PORT=
)
[0-9]+"
)
RESTART_POLICY
=
$(
shell
cat
${CURDIR}
/
${VARS_ENV}
|
grep
-Po
"(?<=RESTART_POLICY=
)
.*"
)
DOCKER_IN_GROUPS
=
$(
shell
groups
|
grep
"docker"
)
MYID
=
$(
shell
id
-u
)
...
...
@@ -29,6 +30,7 @@ preparations:
|
sed
's|<CURDIR>|
${CURDIR}
|g'
\
|
sed
's|<GLOBAL_PREFIX>|
${GLOBAL_PREFIX}
|g'
\
|
sed
's|<FINALLY_EXPOSED_PORT>|
${FINALLY_EXPOSED_PORT}
|g'
\
|
sed
's|<RESTART_POLICY>|
${RESTART_POLICY}
|g'
\
|
sed
's|<VARIABLES_FILE>|
${VARS_ENV}
|g'
\
>
${DC_TEMP}
...
...
variables.env
View file @
49d3b206
# these are to modify the docker-compose.yaml
GLOBAL_PREFIX=rdc-
FINALLY_EXPOSED_PORT=8484
# Docker restart policy (no, on-failure, always, unless-stopped)
# see https://docs.docker.com/compose/compose-file/#restart
RESTART_POLICY=no
# settings inside the containers
VOL=/vol
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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