docker
This commit is contained in:
20
dockerfile
Normal file
20
dockerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# En hafif Nginx imajını kullanıyoruz
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# JSON dosyasını Nginx'in varsayılan yayın klasörüne kopyala
|
||||||
|
COPY config.json /usr/share/nginx/html/config.json
|
||||||
|
|
||||||
|
# (Opsiyonel) CORS hatalarını önlemek için özel bir Nginx konfigürasyonu ekleyelim
|
||||||
|
RUN echo 'server { \
|
||||||
|
listen 80; \
|
||||||
|
location / { \
|
||||||
|
root /usr/share/nginx/html; \
|
||||||
|
index index.json; \
|
||||||
|
add_header Access-Control-Allow-Origin *; \
|
||||||
|
add_header Content-Type application/json; \
|
||||||
|
} \
|
||||||
|
}' > /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Reference in New Issue
Block a user