feat(17-02): docker-compose.yml with env_file secrets, DNS fix, named volume; update .gitignore
- env_file: .env.production — secrets injected at runtime, not baked into image - dns array [8.8.8.8, 1.1.1.1] + NODE_OPTIONS=--dns-result-order=ipv4first for SMTP EAI_AGAIN fix - Named volume uploads:/app/uploads persists PDFs across container restarts - restart: unless-stopped, port 3000:3000 - .gitignore: added /uploads/ entry for production Docker volume path
This commit is contained in:
4
teressa-copeland-homes/.gitignore
vendored
4
teressa-copeland-homes/.gitignore
vendored
@@ -39,3 +39,7 @@ yarn-error.log*
|
|||||||
# typescript
|
# typescript
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
next-env.d.ts
|
next-env.d.ts
|
||||||
|
scripts/.ure-session.json
|
||||||
|
|
||||||
|
# Production uploads (Docker volume on server)
|
||||||
|
/uploads/
|
||||||
|
|||||||
20
teressa-copeland-homes/docker-compose.yml
Normal file
20
teressa-copeland-homes/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
env_file:
|
||||||
|
- .env.production
|
||||||
|
environment:
|
||||||
|
- NODE_OPTIONS=--dns-result-order=ipv4first
|
||||||
|
dns:
|
||||||
|
- 8.8.8.8
|
||||||
|
- 1.1.1.1
|
||||||
|
volumes:
|
||||||
|
- uploads:/app/uploads
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
uploads:
|
||||||
Reference in New Issue
Block a user