Spaces:
Running
Running
build: create dockerfile
Browse files- .dockerignore +65 -0
- Dockerfile +33 -0
.dockerignore
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Version control
|
| 2 |
+
.git
|
| 3 |
+
.gitignore
|
| 4 |
+
.gitattributes
|
| 5 |
+
|
| 6 |
+
# Node.js dependencies
|
| 7 |
+
node_modules
|
| 8 |
+
npm-debug.log
|
| 9 |
+
yarn-debug.log
|
| 10 |
+
yarn-error.log
|
| 11 |
+
|
| 12 |
+
# Build files
|
| 13 |
+
viewer/dist
|
| 14 |
+
viewer/build
|
| 15 |
+
**/dist
|
| 16 |
+
**/build
|
| 17 |
+
|
| 18 |
+
# Logs
|
| 19 |
+
logs
|
| 20 |
+
*.log
|
| 21 |
+
|
| 22 |
+
# Environment files (except public ones)
|
| 23 |
+
.env
|
| 24 |
+
.env.*
|
| 25 |
+
!.env.public
|
| 26 |
+
|
| 27 |
+
# Editor directories and files
|
| 28 |
+
.vscode
|
| 29 |
+
.idea
|
| 30 |
+
*.suo
|
| 31 |
+
*.ntvs*
|
| 32 |
+
*.njsproj
|
| 33 |
+
*.sln
|
| 34 |
+
*.sw?
|
| 35 |
+
|
| 36 |
+
# OS specific files
|
| 37 |
+
.DS_Store
|
| 38 |
+
.DS_Store?
|
| 39 |
+
._*
|
| 40 |
+
.Spotlight-V100
|
| 41 |
+
.Trashes
|
| 42 |
+
ehthumbs.db
|
| 43 |
+
Thumbs.db
|
| 44 |
+
|
| 45 |
+
# Docker files
|
| 46 |
+
Dockerfile
|
| 47 |
+
.dockerignore
|
| 48 |
+
|
| 49 |
+
# URDF files and STLs (if you don't need them in the image)
|
| 50 |
+
*.STL
|
| 51 |
+
*.stl
|
| 52 |
+
|
| 53 |
+
# Tests
|
| 54 |
+
**/__tests__
|
| 55 |
+
**/*.test.*
|
| 56 |
+
**/*.spec.*
|
| 57 |
+
|
| 58 |
+
# Documentation
|
| 59 |
+
*.md
|
| 60 |
+
README.md
|
| 61 |
+
LICENSE
|
| 62 |
+
|
| 63 |
+
# Other unnecessary files
|
| 64 |
+
*.zip
|
| 65 |
+
*.tar.gz
|
Dockerfile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM oven/bun:1 as build
|
| 2 |
+
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Copy package files
|
| 7 |
+
COPY viewer/package.json viewer/bun.lockb ./
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
RUN bun install --frozen-lockfile
|
| 11 |
+
|
| 12 |
+
# Copy project files (respecting .dockerignore)
|
| 13 |
+
COPY viewer/ ./
|
| 14 |
+
|
| 15 |
+
# Build the application
|
| 16 |
+
RUN bun run build
|
| 17 |
+
|
| 18 |
+
# Production stage
|
| 19 |
+
FROM nginx:alpine
|
| 20 |
+
|
| 21 |
+
# Copy built assets from build stage
|
| 22 |
+
COPY --from=build /app/dist /usr/share/nginx/html
|
| 23 |
+
|
| 24 |
+
# Copy nginx configuration if needed
|
| 25 |
+
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 26 |
+
|
| 27 |
+
# Expose port
|
| 28 |
+
EXPOSE 80
|
| 29 |
+
|
| 30 |
+
# Start nginx
|
| 31 |
+
CMD ["nginx", "-g", "daemon off;"]
|
| 32 |
+
|
| 33 |
+
|