commit c760afa330cb23b3337d5c7fb27814ffa8cb5774 Author: mi Date: Mon Nov 3 21:07:40 2025 +1000 :tada: initial commit diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cdf8f8f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +README.md +*.md +.DS_Store diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..3da9342 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy to VM +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Deploy to VM + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.VM_HOST }} + username: ${{ secrets.VM_USERNAME }} + key: ${{ secrets.VM_SSH_KEY }} + port: ${{ secrets.VM_PORT }} + script: | + cd ${{ secrets.DEPLOY_PATH }} + git pull origin main + docker-compose down + docker-compose up -d --build + docker-compose ps \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad768c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.venv +.idea +.DS_Store +docker-compose.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..34caad7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# Use nginx alpine for a small production image +FROM nginx:alpine + +# Copy custom nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Copy site files to nginx html directory +COPY site/ /usr/share/nginx/html/ + +# Expose port 80 +EXPOSE 80 + +# nginx alpine image already has the CMD to start nginx diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f5fb402 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,28 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + # 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; + + # 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; + + # Cache static assets + location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # Serve index.html for all routes (SPA fallback) + location / { + try_files $uri $uri/ /index.html; + } +} diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..d688555 --- /dev/null +++ b/site/index.html @@ -0,0 +1,18 @@ + + + + + + Puercito Fiction + + + + + + +
+

Hola

+

Stay tuned for what's coming.

+
+ + diff --git a/site/styles.css b/site/styles.css new file mode 100644 index 0000000..f1a627b --- /dev/null +++ b/site/styles.css @@ -0,0 +1,33 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; + line-height: 1.6; + color: #333; + background: #fef6e4; + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; +} + +main { + text-align: center; +} + +h1 { + font-family: 'Permanent Marker', cursive; + font-size: 3rem; + font-weight: 400; + margin-bottom: 1rem; +} + +p { + font-size: 1rem; + color: #666; + font-weight: 300; +}