From 1708486fe7df8f92244597f4b65022bc5779c0da Mon Sep 17 00:00:00 2001 From: Stephen Minakian Date: Tue, 15 Jul 2025 16:33:57 -0600 Subject: [PATCH] Add deployment workflow and Docker configuration --- Dockerfile | 0 docker-compose.yml | 19 +++++++++++++++++++ nginx.conf | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..04b6c87 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3.8' + +services: + apartment-dashboard: + build: . + container_name: apartment-dashboard + restart: unless-stopped + labels: + - "traefik.enable=true" + - "traefik.http.routers.apartments.rule=Host(`apartments.maverickapplications.com`)" + - "traefik.http.routers.apartments.entrypoints=websecure" + - "traefik.http.routers.apartments.tls.certresolver=letsencrypt" + - "traefik.http.services.apartments.loadbalancer.server.port=80" + networks: + - traefik + +networks: + traefik: + external: true \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f170b41 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,28 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html index.htm; + + # Handle client-side routing + location / { + try_files $uri $uri/ /index.html; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # Security headers + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-XSS-Protection "1; mode=block" always; + + # Gzip compression + gzip on; + gzip_vary on; + gzip_min_length 1024; + gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json; +} \ No newline at end of file