mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
Set container hostname to "seafile".
This commit is contained in:
parent
53bc05d2ef
commit
c2d58f299b
|
@ -14,5 +14,5 @@ script:
|
||||||
- sudo ./launcher bootstrap
|
- sudo ./launcher bootstrap
|
||||||
- sudo ./launcher start && sleep 10
|
- sudo ./launcher start && sleep 10
|
||||||
- sudo ./launcher stop --skip-prereqs
|
- sudo ./launcher stop --skip-prereqs
|
||||||
- sudo ./launcher start --docker-args "-h seafile-server" && sleep 10
|
- sudo ./launcher start --docker-args "--memory 1g" && sleep 10
|
||||||
- sudo ./launcher restart
|
- sudo ./launcher restart
|
||||||
|
|
13
launcher
13
launcher
|
@ -126,14 +126,6 @@ bootstrap() {
|
||||||
docker build -f bootstrap/generated/Dockerfile -t local_seafile/server:latest .
|
docker build -f bootstrap/generated/Dockerfile -t local_seafile/server:latest .
|
||||||
}
|
}
|
||||||
|
|
||||||
oldstart() {
|
|
||||||
set_volumes
|
|
||||||
set_ports
|
|
||||||
docker run $user_args --rm -it --name seafile $volumes $ports $image \
|
|
||||||
/sbin/my_init -- bash -l
|
|
||||||
# /sbin/my_init -- /scripts/start.py
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
existing=$(docker ps | awk '{ print $1, $(NF) }' | grep " seafile$" | awk '{ print $1 }' || true)
|
existing=$(docker ps | awk '{ print $1, $(NF) }' | grep " seafile$" | awk '{ print $1 }' || true)
|
||||||
if [[ $existing != "" ]]; then
|
if [[ $existing != "" ]]; then
|
||||||
|
@ -154,7 +146,6 @@ start() {
|
||||||
set_volumes
|
set_volumes
|
||||||
set_ports
|
set_ports
|
||||||
|
|
||||||
|
|
||||||
local restart_policy attach_on_run
|
local restart_policy attach_on_run
|
||||||
if [[ "${SUPERVISED}" = "true" ]]; then
|
if [[ "${SUPERVISED}" = "true" ]]; then
|
||||||
restart_policy="--restart=no"
|
restart_policy="--restart=no"
|
||||||
|
@ -165,7 +156,7 @@ start() {
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
docker run $user_args $attach_on_run $restart_policy --name seafile $volumes $ports $local_image
|
docker run $user_args $attach_on_run $restart_policy --name seafile -h seafile $volumes $ports $local_image
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +220,7 @@ main() {
|
||||||
while [[ $# -gt 0 ]]
|
while [[ $# -gt 0 ]]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
bootstrap|oldstart|start|stop|restart|enter|destroy|logs|rebuild)
|
bootstrap|start|stop|restart|enter|destroy|logs|rebuild)
|
||||||
action=$1 ; shift 1 ;;
|
action=$1 ; shift 1 ;;
|
||||||
--debug) debug=true ; shift 1 ;;
|
--debug) debug=true ; shift 1 ;;
|
||||||
--skip-prereqs) SKIP_PREREQS=true ; shift 1 ;;
|
--skip-prereqs) SKIP_PREREQS=true ; shift 1 ;;
|
||||||
|
|
Loading…
Reference in a new issue