build: dockerignore, drop _to_delete from the repo
This commit is contained in:
32
.dockerignore
Normal file
32
.dockerignore
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# What must never enter the build context.
|
||||||
|
#
|
||||||
|
# There was no .dockerignore at all, so every one of these was being uploaded to
|
||||||
|
# the Docker daemon on each build and then copied into the builder image by
|
||||||
|
# `COPY . .`.
|
||||||
|
#
|
||||||
|
# `.git` is the one that matters for speed — it carries the entire history, and
|
||||||
|
# it grows forever while being worthless to a build. The rest is correctness:
|
||||||
|
# `dist` and `node_modules` from a developer's machine would be copied in and
|
||||||
|
# then overwritten by the build, but only after being transferred, and a stale
|
||||||
|
# `dist` copied over the fresh one is a genuinely confusing failure.
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Scratch. `_to_delete` is spent files awaiting removal and has no business in
|
||||||
|
# an image.
|
||||||
|
_to_delete
|
||||||
|
*.zip
|
||||||
|
*.tgz
|
||||||
|
_inv.txt
|
||||||
|
|
||||||
|
# Per-machine overrides. `.env` itself IS wanted — it carries VITE_API_BASE and
|
||||||
|
# the build needs it — but `.env.local` is a developer's private override and
|
||||||
|
# must not decide what production talks to.
|
||||||
|
.env.local
|
||||||
|
*.local
|
||||||
|
|
||||||
|
.vscode
|
||||||
|
.DS_Store
|
||||||
|
README.md
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -4,3 +4,11 @@ dist
|
|||||||
*.local
|
*.local
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
# Spent files awaiting deletion. Was tracked, which put it in the repo and in
|
||||||
|
# every Docker build context.
|
||||||
|
_to_delete
|
||||||
|
|
||||||
|
# Transfer archives.
|
||||||
|
*.zip
|
||||||
|
*.tgz
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
# Serve the React App
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
# Force Nginx to pass routing back to React Router
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Proxy /hasura to the live API, exactly like Vite dev server does
|
|
||||||
location /hasura/ {
|
|
||||||
proxy_pass https://api.workolik.com/api/rest/;
|
|
||||||
proxy_set_header x-hasura-admin-secret "nearle-admin-secret";
|
|
||||||
proxy_ssl_server_name on;
|
|
||||||
|
|
||||||
# Pass standard proxy headers
|
|
||||||
proxy_set_header Host api.workolik.com;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user