Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dtu-enote-getpdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enote
dtu-enote-getpdf
Commits
3434c5e5
Commit
3434c5e5
authored
Jun 29, 2018
by
Martin Jeppesen
Browse files
Options
Downloads
Patches
Plain Diff
Attempt to make it compile on Ubuntu
parent
18cbd68c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+30
-37
30 additions, 37 deletions
Dockerfile
docker-compose.yml
+10
-7
10 additions, 7 deletions
docker-compose.yml
getpdf-server/build-pdf.sh
+3
-3
3 additions, 3 deletions
getpdf-server/build-pdf.sh
run-server.sh
+3
-3
3 additions, 3 deletions
run-server.sh
with
46 additions
and
50 deletions
Dockerfile
+
30
−
37
View file @
3434c5e5
FROM
dtucompute/sharelatex
-enote:v2
FROM
dtucompute/sharelatex
:2018
LABEL
github="https://github.com/dtu-compute/dtu-enote-getpdf"
LABEL
github="https://github.com/dtu-compute/dtu-enote-getpdf"
LABEL
version="2018"
LABEL
version="2018"
...
@@ -7,59 +7,52 @@ for the get-pdf project."
...
@@ -7,59 +7,52 @@ for the get-pdf project."
ARG
TZ=Europe/Copenhagen
ARG
TZ=Europe/Copenhagen
# Set timezone
RUN
apt-get
-y
-qq
install
build-essential nano nginx openssh-server git openssh-client curl openssl
\
RUN
sudo cp
/usr/share/zoneinfo/
$TZ
/etc/localtime
libreadline-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev
\
RUN
sudo
bash
-l
-c
'echo "${TZ}" > /etc/timezone'
libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
\
automake libtool bison pkg-config gnupg2
RUN
rm
-rf
/etc/service/
*
/etc/my_init.d/
*
RUN
apt-get
-y
-qq
install
parallel
RUN
ln
-s
/bin/bash /usr/bin/bash
RUN
cp
/usr/bin/parallel /tmp
RUN
apt-get
-y
-qq
install
moreutils
RUN
sed
-i
's/PermitRootLogin prohibit-password/PermitRootLogin yes/'
/etc/ssh/sshd_config
RUN
mv
/tmp/parallel /usr/bin/
RUN
sed
-ri
's/#?LogLevel INFO/LogLevel VERBOSE/'
/etc/ssh/sshd_config
COPY
get-pdf.sh /
COPY
get-pdf.sh /
COPY
mod_caption.rb /
COPY
mod_caption.rb /
COPY
run-server.sh /
COPY
run-server.sh /
# basics
RUN
ln
-s
/bin/bash /usr/bin/bash
RUN
apt-get
install
-y
nginx openssh-server git openssh-client curl
RUN
apt-get
install
-y
nano
RUN
apt-get
install
-y
build-essential
RUN
apt-get
install
-y
openssl libreadline6 libreadline6-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison pkg-config
RUN
apt-get
install
-y
gnupg2
# install RVM, Ruby, and Bundler
RUN
sed
-i
's/PermitRootLogin prohibit-password/PermitRootLogin yes/'
/etc/ssh/sshd_config
RUN
gpg2
--keyserver
hkp://keys.gnupg.net
--recv-keys
409B6B1796C275462A1703113804BB82D39DC0E3
RUN
sed
-ri
's/#?LogLevel INFO/LogLevel VERBOSE/'
/etc/ssh/sshd_config
RUN
\c
url
-L
https://get.rvm.io | bash
-s
stable
RUN
/bin/bash
-l
-c
"rvm requirements"
RUN
/bin/bash
-l
-c
"rvm install 2.2.4"
RUN
/bin/bash
-l
-c
"gem install bundler --no-ri --no-rdoc"
RUN
echo
"source /etc/profile.d/rvm.sh"
>>
~/.bashrc
RUN
apt-get
-y
install
parallel
## install RVM, Ruby, and Bundler
RUN
cp
/usr/bin/parallel /tmp
#RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN
apt-get
-y
install
moreutils
#RUN \curl -L https://get.rvm.io | bash -s stable
RUN
mv
/tmp/parallel /usr/bin/
#RUN /bin/bash -l -c "rvm requirements"
#RUN /bin/bash -l -c "rvm install 2.2.4"
#RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
#RUN echo "source /etc/profile.d/rvm.sh" >> ~/.bashrc
RUN
ln
-s
/usr/local/texlive/2017/bin/x86_64-linux/pdflatex /usr/bin/
RUN
apt-get
-y
-qq
install
ruby ruby-bundler
RUN
curl
-o-
https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
#
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
RUN
mkdir
/getpdf-server
RUN
mkdir
/getpdf-server
COPY
getpdf-server /getpdf-server
COPY
getpdf-server /getpdf-server
WORKDIR
/getpdf-server
WORKDIR
/getpdf-server
ENV
NVM_DIR /root/.nvm
#
ENV NVM_DIR /root/.nvm
ENV
NODE_VERSION --lts
#
ENV NODE_VERSION --lts
RUN
.
$NVM_DIR
/nvm.sh
\
#
RUN . $NVM_DIR/nvm.sh \
&&
nvm
install
$NODE_VERSION
\
#
&& nvm install $NODE_VERSION \
&&
nvm use default
\
#
&& nvm use default \
&&
npm
install
\
#
&& npm install \
&&
npm run build
\
#
&& npm run build \
&&
npm
install
forever
-g
#
&& npm install forever -g
WORKDIR
.
WORKDIR
.
ENTRYPOINT
["/bin/bash", "-l", "-c", "/run-server.sh"]
ENTRYPOINT
["/bin/bash", "-l", "-c", "/run-server.sh"]
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
10
−
7
View file @
3434c5e5
version
:
'
2'
services
:
get-pdf
:
get-pdf
:
build
:
/docker/get-pdf
build
:
.
container_name
:
get-pdf
expose
:
expose
:
-
"
22"
-
"
22"
volumes
:
#
volumes:
-
/vol/enotes:/enotes
#
- /vol/enotes:/enotes
-
/vol/getpdf-keys:/root/.ssh
#
- /vol/getpdf-keys:/root/.ssh
This diff is collapsed.
Click to expand it.
getpdf-server/build-pdf.sh
+
3
−
3
View file @
3434c5e5
#!/bin/bash
#!/bin/bash
#!/usr/bin/bash
# /get-pdf.sh 01005 course.zip <jobid>
# /get-pdf.sh 01005 course.zip <jobid>
...
@@ -16,7 +15,7 @@ export LC_ALL=en_US.UTF-8
...
@@ -16,7 +15,7 @@ export LC_ALL=en_US.UTF-8
rm
-rf
$project
rm
-rf
$project
mkdir
-p
$project
mkdir
-p
$project
pdflatex
=
"
/usr/local/texlive/2017/bin/x86_64-linux/
pdflatex -halt-on-error -interaction=nonstopmode"
pdflatex
=
"pdflatex -halt-on-error -interaction=nonstopmode"
echo
"/build-pdf.sh
$course
$course_zip
$jobid
"
echo
"/build-pdf.sh
$course
$course_zip
$jobid
"
...
@@ -63,7 +62,7 @@ if [ $course == 00000 ] || [ $course == 01005 ] || [ $course == 01006 ]; then
...
@@ -63,7 +62,7 @@ if [ $course == 00000 ] || [ $course == 01005 ] || [ $course == 01006 ]; then
env
src
=
"
$SRC
"
env
dst
=
"
$DST
"
perl
-i
-pe
's/\Q$ENV{src}\E/$ENV{dst}/g'
${
FILE
%.*
}
.tex
env
src
=
"
$SRC
"
env
dst
=
"
$DST
"
perl
-i
-pe
's/\Q$ENV{src}\E/$ENV{dst}/g'
${
FILE
%.*
}
.tex
done
< ../refs2update
done
< ../refs2update
for
f
in
*
.tex
;
do
cat
$f
|
/usr/local/rvm/rubies/ruby-2.2.4/bin/
ruby
-0777
-pe
'$_.gsub!(/href{[^}]+}/){ |href| href.gsub(%q|#|, %q|\#|) }'
| sponge
$f
;
done
for
f
in
*
.tex
;
do
cat
$f
| ruby
-0777
-pe
'$_.gsub!(/href{[^}]+}/){ |href| href.gsub(%q|#|, %q|\#|) }'
| sponge
$f
;
done
ls
*
tex | parallel
-j
8
"
$pdflatex
{}"
ls
*
tex | parallel
-j
8
"
$pdflatex
{}"
...
@@ -89,3 +88,4 @@ if [ $course == 02323 ] || [ $course == 02402 ]; then
...
@@ -89,3 +88,4 @@ if [ $course == 02323 ] || [ $course == 02402 ]; then
mv
/tmp/log.txt
$co
/
mv
/tmp/log.txt
$co
/
cp
-r
menu/
*
$co
/
cp
-r
menu/
*
$co
/
fi
fi
This diff is collapsed.
Click to expand it.
run-server.sh
+
3
−
3
View file @
3434c5e5
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
pushd
/getpdf-server
pushd
/getpdf-server
.
$NVM_DIR
/nvm.sh
#. $NVM_DIR/nvm.sh
# sleep 10
sleep
10
NODE_ENV
=
production forever
--minUptime
1000
--spinSleepTime
10000 start
-o
~/getpdf_server_out.log
-e
~/getpdf_server_err.log dist/index.js &
NODE_ENV
=
production forever
--minUptime
1000
--spinSleepTime
10000 start
-o
~/getpdf_server_out.log
-e
~/getpdf_server_err.log dist/index.js &
/usr/sbin/sshd
-D
/usr/sbin/sshd
-D
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment