Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Node-sass with Sass, Dockerized Client, Updated Server File Structure #44

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 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
22 changes: 22 additions & 0 deletions SampleCode/LabelingUX/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Edge",
"request": "launch",
"type": "msedge",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
38 changes: 38 additions & 0 deletions SampleCode/LabelingUX/Client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Node.js and npm
node_modules
npm-debug.log

# Yarn
yarn-error.log

# Environment variables
.env

# Logs
logs
*.log

# Dependency directories
jspm_packages

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Webpack files
.cache
dist

# Docker files
Dockerfile
docker-compose.yml

# Miscellaneous
.DS_Store
*.swp
*.swo
.vscode
.idea
*.iml
33 changes: 33 additions & 0 deletions SampleCode/LabelingUX/Client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM node:14-alpine
# Install necessary packages
RUN apk update && apk add --no-cache --virtual .build-deps \
g++ make py3-pip alpine-sdk python3 \
libjpeg-turbo-dev libpng-dev \
# Additional dependencies for canvas
cairo-dev jpeg-dev pango-dev giflib-dev

# Ensure python3 is used
RUN ln -sf python3 /usr/bin/python

# Install node-gyp globally to help with native builds
RUN npm install -g node-gyp

RUN npm install -g typescript
EXPOSE 3000

# Setup the app directory
RUN mkdir /app
WORKDIR /app
COPY . /app
COPY package*.json /app

# Install dependencies with verbose logging
RUN npm cache verify && npm install --verbose
# RUN npm install @types/react-router-dom@latest
# Verify that react-scripts and other dependencies are installed
RUN ls -la node_modules/.bin && ls -la node_modules/react-scripts

# Attempt to rebuild node-sass with more verbose output for troubleshooting
#RUN npm rebuild node-sass --verbose || echo "Failed to rebuild node-sass, consider using Dart Sass as an alternative."

CMD ["npm", "start"]
13 changes: 13 additions & 0 deletions SampleCode/LabelingUX/Client/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'

services:
app:
build: .
ports:
- "3000:3000"
volumes:
- .:/app
- ./logs:/app/logs
- ./.env:/app/.env
environment:
- NODE_ENV=development
Loading