Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
docker
lurker
Commits
f3c01bfb
Commit
f3c01bfb
authored
Aug 02, 2019
by
ale
Browse files
Move static assets out of mounted data dirs
parent
0156a7ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
f3c01bfb
...
@@ -7,6 +7,7 @@ RUN go build -o smtpd smtpd.go
...
@@ -7,6 +7,7 @@ RUN go build -o smtpd smtpd.go
# Stage 2: build the final container
# Stage 2: build the final container
FROM
registry.git.autistici.org/ai3/docker/apache2-base:master
FROM
registry.git.autistici.org/ai3/docker/apache2-base:master
COPY
start.sh /start.sh
COPY
build.sh /tmp/build.sh
COPY
build.sh /tmp/build.sh
COPY
conf/ /etc/
COPY
conf/ /etc/
COPY
--from=build /go/src/smtpd /usr/bin/smtpd
COPY
--from=build /go/src/smtpd /usr/bin/smtpd
...
...
build.sh
View file @
f3c01bfb
...
@@ -35,6 +35,14 @@ a2enconf -q serve-cgi-bin
...
@@ -35,6 +35,14 @@ a2enconf -q serve-cgi-bin
# Create mountpoint dirs.
# Create mountpoint dirs.
mkdir
-p
/var/lib/lurker
mkdir
-p
/var/lib/lurker
# Lurker installs some package files in mountpoint directories,
# so the original files would disappear "below" the mount. To
# prevent this, we copy the files to a well-known location
# beforehand, and set up links at run-time.
mkdir
-p
/var/lib/lurker-www
mv
/etc/lurker/ui /var/lib/lurker-www/ui
mv
/var/lib/lurker/www/index.html /var/lib/lurker-www/index.html
# Clear the existing default config
# Clear the existing default config
# (this will be mounted externally).
# (this will be mounted externally).
rm
-fr
/etc/lurker/
*
rm
-fr
/etc/lurker/
*
...
...
conf/chaperone.d/start.conf
0 → 100644
View file @
f3c01bfb
lurker_setup
.
service
: {
type
:
oneshot
,
stdout
:
inherit
,
service_groups
:
INIT
,
process_timeout
:
60
,
command
:
"/start.sh"
,
}
start.sh
0 → 100755
View file @
f3c01bfb
#!/bin/sh
www_dir
=
/var/lib/lurker/www
static_dir
=
/var/lib/lurker-www
echo
"Fixing symlinks..."
>
&2
if
[
!
-e
${
www_dir
}
/imgs
]
;
then
ln
-sf
/usr/share/lurker/www/imgs
${
www_dir
}
/imgs
fi
if
[
!
-e
${
www_dir
}
/index.html
]
;
then
ln
-sf
${
static_dir
}
/index.html
${
www_dir
}
/index.html
fi
if
[
!
-e
${
www_dir
}
/ui
]
;
then
ln
-sf
${
static_dir
}
/ui
${
www_dir
}
/ui
fi
if
[
!
-e
${
www_dir
}
/lurker.docroot
]
;
then
touch
${
www_dir
}
/lurker.docroot
fi
exit
0
Write
Preview
Supports
Markdown
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