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
Rex Dri
Rex Dri
Commits
398eb6ba
Verified
Commit
398eb6ba
authored
Apr 13, 2020
by
Florent Chehab
Browse files
fix(documentation): try to reduce browser caching in dev
parent
83d3e5a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
docker-compose.yml
View file @
398eb6ba
...
...
@@ -108,7 +108,7 @@ services:
build
:
./documentation
volumes
:
[
"
./documentation:/usr/src/app"
]
# Start a simple python folder
command
:
/bin/sh -c "python -m http.server 5000"
command
:
python run_server.py
ports
:
[
"
5000:5000"
]
# replicate the server port
# service to generate the UML of the backend
...
...
documentation/Dockerfile
View file @
398eb6ba
# Very basic Dockerfile that simply pull a python image to run a pyton server.
# Pull official base image
FROM
python:3.
7.2
-alpine
3.9
FROM
python:3.
8
-alpine
# Set-up a workdir so that it can be mapped to a volume in docker-compose.
WORKDIR
/usr/src/app
documentation/run_server.py
0 → 100644
View file @
398eb6ba
#!/usr/bin/env python
import
http.server
class
MyHTTPRequestHandler
(
http
.
server
.
SimpleHTTPRequestHandler
):
def
end_headers
(
self
):
# Prevent annoying caching of the documentation
self
.
send_header
(
"Cache-Control"
,
"no-cache, no-store, must-revalidate"
)
self
.
send_header
(
"Pragma"
,
"no-cache"
)
self
.
send_header
(
"Expires"
,
"0"
)
http
.
server
.
SimpleHTTPRequestHandler
.
end_headers
(
self
)
if
__name__
==
"__main__"
:
httpd
=
http
.
server
.
HTTPServer
((
"0.0.0.0"
,
5000
),
MyHTTPRequestHandler
)
httpd
.
serve_forever
()
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