Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dtu-enote
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
Commits
4ec5d31d
Commit
4ec5d31d
authored
Mar 15, 2019
by
iaibrys
Browse files
Options
Downloads
Patches
Plain Diff
Initial changes for FS restructure
parent
915a4e53
No related branches found
No related tags found
1 merge request
!78
Initial changes for FS restructure
Pipeline
#138
passed
Mar 15, 2019
Stage: build
Stage: release
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+9
-7
9 additions, 7 deletions
Dockerfile
erb/default.conf.erb
+4
-6
4 additions, 6 deletions
erb/default.conf.erb
erb/docker-compose-enote.yml.erb
+13
-19
13 additions, 19 deletions
erb/docker-compose-enote.yml.erb
lib/enote_config.rb
+1
-0
1 addition, 0 deletions
lib/enote_config.rb
with
27 additions
and
32 deletions
Dockerfile
+
9
−
7
View file @
4ec5d31d
FROM
nginx:
stabl
e
FROM
nginx:
alpin
e
# We will map these using volumes
RUN
rm
/etc/nginx/nginx.conf
RUN
rm
/etc/nginx/conf.d/default.conf
RUN
touch
/var/run/nginx.pid
&&
\
chown
-R
www-data:www-data /etc/nginx
&&
\
chown
-R
www-data:www-data /var/run/nginx.pid
&&
\
chown
-R
www-data:www-data /var/cache/nginx
&&
\
chown
-R
www-data:www-data /var/log/nginx/
RUN
touch
/var/run/nginx.pid
#RUN
chown -R www-data:www-data /etc/nginx && \
#
chown -R www-data:www-data /var/run/nginx.pid && \
#
chown -R www-data:www-data /var/cache/nginx && \
#
chown -R www-data:www-data /var/log/nginx/
USER
www-data
#RUN usermod -u 1000 www-data
#USER www-data
This diff is collapsed.
Click to expand it.
erb/default.conf.erb
+
4
−
6
View file @
4ec5d31d
...
...
@@ -213,7 +213,7 @@ server {
}
location /uploads {
alias /data/
uploads
/
<%=
course_name
%>
;
alias /data/
content
/
<%=
course_name
%>
/uploads/
;
sendfile off;
expires 0;
add_header Cache-Control private;
...
...
@@ -226,7 +226,7 @@ server {
break;
}
location /filemanager {
alias /data;
alias /data
/content/
;
sendfile off;
expires 0;
add_header Cache-Control private;
...
...
@@ -298,8 +298,6 @@ server {
}
## end -enote version
<%
end
%>
...
...
@@ -349,7 +347,7 @@ server {
}
location /uploads {
alias /data/uploads;
alias /data/
content/
<%=
course_name
%>
/
uploads
/
;
sendfile off;
expires 0;
add_header Cache-Control private;
...
...
@@ -362,7 +360,7 @@ server {
break;
}
location /filemanager {
alias /data;
alias /data
/content/
;
sendfile off;
expires 0;
add_header Cache-Control private;
...
...
This diff is collapsed.
Click to expand it.
erb/docker-compose-enote.yml.erb
+
13
−
19
View file @
4ec5d31d
...
...
@@ -6,7 +6,7 @@ services:
redis:
container_name: redis
image: redis
image: redis
:alpine
<%
if
public_server
%>
expose:
- "6379"
...
...
@@ -41,7 +41,7 @@ services:
-
<%=
@data_root
%>
/config/quiz-db.yaml:/data/mongo-db.yaml
-
<%=
@data_root
%>
/quiz-db:/data/db
-
<%=
@data_root
%>
/quiz-db-backups:/data/backups
-
<%=
@
data
_root
%>
/
log/
quiz-db:/var/log/mongodb
-
<%=
@
log
_root
%>
/quiz-db:/var/log/mongodb
environment:
AUTH: 'yes'
TZ: '
<%=
timezone
%>
'
...
...
@@ -75,7 +75,7 @@ services:
-
<%=
@data_root
%>
/quiz-public:/data/quiz-public # assets for the quiz web-app
-
<%=
@data_root
%>
/quiz-keys:/data/quiz-keys # keys for the course github repos for the quizzes
-
<%=
@data_root
%>
/quiz-repos:/data/quiz-repos # kcourse github repos for the quizzes
-
<%=
@
data
_root
%>
/
log/
quiz:/dtu-quiz/log
-
<%=
@
log
_root
%>
/quiz:/dtu-quiz/log
environment:
RAILS_ENV: 'production'
allow_testing: '
<%=
allow_testing
%>
'
...
...
@@ -103,8 +103,8 @@ services:
<%
end
%>
volumes:
-
<%=
@data_root
%>
/config:/data/config
-
<%=
@data_root
%>
/
website-enotes-staging:/enotes
-
<%=
@data_root
%>
/getpdf-keys:/root/.ssh
-
<%=
@data_root
%>
/
content:/content
#
-
<%=
@data_root
%>
/getpdf-keys:/root/.ssh
-
<%=
@data_root
%>
/sharelatex-data/:/var/lib/sharelatex
environment:
TIMEZONE_CITY: '
<%=
timezone_city
%>
'
...
...
@@ -116,7 +116,7 @@ services:
<%
if
enabled_features
[
:sharelatexdb
]
%>
sharelatex-db:
container_name:
<%=
@container_prefix
%>
sharelatex-db
image: mongo:4.0.
0
image: mongo:4.0.
6-xenial
expose:
- "27017"
ports:
...
...
@@ -124,7 +124,7 @@ services:
volumes:
-
<%=
@data_root
%>
/config/sharelatex-db.yaml:/data/mongo-db.yaml
-
<%=
@data_root
%>
/sharelatex-db:/data/db
-
<%=
@
data
_root
%>
/
log/
sharelatex-db:/var/log/mongodb
-
<%=
@
log
_root
%>
/sharelatex-db:/var/log/mongodb
environment:
TIMEZONE_CITY: '
<%=
timezone_city
%>
'
TZ: '
<%=
timezone
%>
'
...
...
@@ -135,7 +135,7 @@ services:
<%
if
enabled_features
[
:sharelatex
]
%>
sharelatex-redis:
container_name:
<%=
@container_prefix
%>
redis_sharelatex
image: redis
image: redis
:alpine
expose:
- "6379"
environment:
...
...
@@ -210,14 +210,11 @@ services:
-
<%=
@data_root
%>
/config:/data/config
-
<%=
@data_root
%>
/cndumper:/data/user_config
-
<%=
@gen_root
%>
/deployment-info.yaml:/data/env_config/deployment-info.yaml
-
<%=
@data_root
%>
/website-uploads/:/filemanager/uploads/
-
<%=
@data_root
%>
/website-enotes/:/filemanager/enotes/
-
<%=
@data_root
%>
/website-enotes-staging/:/filemanager/enotes-staging/
-
<%=
@data_root
%>
/content/:/data/content
-
<%=
@data_root
%>
/website-db/:/data/website-db/
-
<%=
@data_root
%>
/website-public/:/data/website-public/
-
<%=
@data_root
%>
/website-raw/:/data/website-raw/
-
<%=
@data_root
%>
/log/course-website:/dtu-course/app/log
-
<%=
@data_root
%>
/getpdf-keys:/get-pdf-keys
-
<%=
@log_root
%>
/course-website:/dtu-course/app/log
# -
<%=
@data_root
%>
/getpdf-keys:/get-pdf-keys
expose:
- "3000"
networks:
...
...
@@ -235,14 +232,11 @@ services:
-
<%=
@gen_root
%>
/default.conf:/etc/nginx/conf.d/default.conf
-
<%=
@src_root
%>
/dtu-enote/nginx.conf:/etc/nginx/nginx.conf
-
<%=
@data_root
%>
/certs:/data/certs/:ro
-
<%=
@
data
_root
%>
/
log/
revproxy:/var/log/nginx
-
<%=
@
log
_root
%>
/revproxy:/var/log/nginx
-
<%=
@data_root
%>
/quiz-public/:/data/quiz-public
-
<%=
@data_root
%>
/quiz-assets/:/data/quiz-assets
-
<%=
@data_root
%>
/website-public/:/data/website-public
-
<%=
@data_root
%>
/website-raw/:/data/website-raw
-
<%=
@data_root
%>
/website-uploads/:/data/uploads
-
<%=
@data_root
%>
/website-enotes/:/data/enotes
-
<%=
@data_root
%>
/website-enotes-staging/:/data/enotes-staging
-
<%=
@data_root
%>
/content/:/data/content
-
<%=
@data_root
%>
/root/:/var/www
networks:
- revproxynet
...
...
This diff is collapsed.
Click to expand it.
lib/enote_config.rb
+
1
−
0
View file @
4ec5d31d
...
...
@@ -33,6 +33,7 @@ module EnoteConfig
@logger
.
level
=
Logger
::
DEBUG
@data_root
=
ENV
[
'DTU_ENOTE_VOL'
]
||
'/enote/vol'
@log_root
=
ENV
[
'DTU_ENOTE_LOG'
]
||
'/enote/log'
@gen_root
=
ENV
[
'DTU_ENOTE_GEN'
]
||
'/enote/gen'
@src_root
=
ENV
[
'DTU_ENOTE_SRC'
]
||
'/enote/src'
@config_root
=
File
.
join
(
data_root
,
'config'
)
...
...
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