-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (57 loc) · 1.7 KB
/
Copy pathDockerfile
File metadata and controls
61 lines (57 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Use lightweight nginx image
FROM nginx:alpine
# Copy static files
COPY index.html styles.css script.js robots.txt sitemap.xml /app/
COPY health.html /app/
COPY resume.txt resume.json llms.txt /app/
COPY docs /app/docs
# Create proper nginx config
RUN echo 'server { \
listen 8080; \
server_name _; \
root /app; \
index index.html; \
\
location /health.html { \
access_log off; \
add_header Content-Type "text/html; charset=utf-8"; \
return 200 "OK"; \
} \
\
location = /resume.txt { \
add_header Content-Type "text/plain; charset=utf-8"; \
add_header X-Robots-Tag "all"; \
add_header Cache-Control "public, max-age=3600"; \
try_files $uri =404; \
} \
\
location = /resume.json { \
add_header Content-Type "application/json; charset=utf-8"; \
add_header Access-Control-Allow-Origin "*"; \
add_header X-Robots-Tag "all"; \
add_header Cache-Control "public, max-age=3600"; \
try_files $uri =404; \
} \
\
location = /llms.txt { \
add_header Content-Type "text/markdown; charset=utf-8"; \
add_header X-Robots-Tag "all"; \
add_header Cache-Control "public, max-age=3600"; \
try_files $uri =404; \
} \
\
location ~* \.pdf$ { \
add_header Content-Type "application/pdf"; \
add_header Content-Disposition "attachment"; \
try_files $uri =404; \
} \
\
location / { \
add_header Cache-Control "no-cache, no-store, must-revalidate"; \
try_files index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 8080
# Start nginx in foreground
CMD ["nginx", "-g", "daemon off;"]