Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
node_modules
dist-ssr
.git
.github
.idea
.vscode
.DS_Store
.env
.env.*
!.env.example
*.log
*.png
*.aab
android/build
android/.gradle
.playwright-cli
.vercel
wallet-*.yaml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ android/.gradle/
android/*/build/
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
android/downloads/
.playwright-cli/
wallet-*.yaml
*.png
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ditto Docker Image
#
# Ditto depends on TOON workspace packages via file: references,
# so it must be built locally before containerizing.
#
# Build steps:
# npm install && npm run build # (or use prep-ditto-build.sh)
# docker build -t ghcr.io/toon-protocol/ditto:latest .
#
# The Dockerfile just serves the pre-built dist/ via nginx.

FROM nginx:alpine

COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY dist/ /usr/share/nginx/html/

EXPOSE 80

HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
CMD wget -q --spider http://localhost/ || exit 1

CMD ["nginx", "-g", "daemon off;"]
105 changes: 0 additions & 105 deletions _bmad-output/implementation-artifacts/spec-wip.md

This file was deleted.

27 changes: 27 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;

# SPA: serve index.html for all non-file routes
location / {
try_files $uri $uri/ /index.html;
}

# Cache static assets aggressively
location /assets/ {
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 Referrer-Policy "strict-origin-when-cross-origin" always;

# Gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 256;
}
Loading
Loading