Skip to content
Open

az #401

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
105 changes: 105 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Git
.git
.gitignore
.gitattributes

# Documentation
README.md
CHANGELOG.md
LICENSE
*.md

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Docker
Dockerfile
.dockerignore
docker-compose*.yml

# Development files
*.tmp
*.temp
.tmp/
.temp/

# Sites (will be mounted as volumes)
sites/*/
!sites/requirements.txt
!sites/apps.txt

# Compiled assets (will be built in container)
gameplan/public/dist/
gameplan/public/.build/

# Test files
.test_*
test_*
*_test.py
tests/

# Gameplan specific
*.log
*.sqlite
*.db
discussions_*.json
team_data/
chat_backups/
86 changes: 86 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
FROM python:3.11-slim-bookworm

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
DEBIAN_FRONTEND=noninteractive

# Install system dependencies
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential \
pkg-config \
# Database clients
default-mysql-client \
postgresql-client \
# Node.js and npm
nodejs \
npm \
# Media processing
libmagic1 \
libpango-1.0-0 \
libpangoft2-1.0-0 \
# Fonts
fonts-liberation \
fonts-noto-cjk \
# PDF generation
wkhtmltopdf \
# SSL and crypto
libssl-dev \
libffi-dev \
# Git
git \
# Process management
supervisor \
# Image processing
libjpeg-dev \
libpng-dev \
# XML/HTML processing
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
# Cleanup
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Create gameplan user
RUN useradd -m -s /bin/bash gameplan

# Set working directory
WORKDIR /home/gameplan

# Copy requirements first for better caching
COPY requirements.txt .
COPY package.json .

# Install Python dependencies
RUN pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt

# Install Node.js dependencies
RUN npm install -g yarn \
&& npm install

# Copy application code
COPY . .

# Set ownership
RUN chown -R gameplan:gameplan /home/gameplan

# Switch to gameplan user
USER gameplan

# Build frontend assets
RUN npm run production

# Expose port
EXPOSE 8000

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:8000/api/method/ping')" || exit 1

# Default command
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "--timeout", "120", "gameplan.app:application"]
90 changes: 78 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,79 @@
{
"private": true,
"aworkspaces": ["frontend", "frappe-ui"],
"scripts": {
"postinstall": "cd frontend && yarn install",
"dev": "cd frontend && yarn dev",
"build": "cd frontend && yarn build",
"disable-workspaces": "sed -i '' 's/\"workspaces\"/\"aworkspaces\"/g' package.json",
"enable-workspaces": "sed -i '' 's/\"aworkspaces\"/\"workspaces\"/g' package.json && rm -rf node_modules ./frontend/node_modules/ frappe-ui/node_modules/ && yarn install",
"upgrade-frappeui": "cd frontend && yarn add frappe-ui@latest && cd ..",
"disable-workspaces-and-upgrade-frappeui": "yarn disable-aworkspaces && yarn upgrade-frappeui"
}
}
"name": "gameplan",
"version": "1.0.0-dev",
"description": "Open Source Discussions Platform for Remote Teams",
"main": "gameplan/public/js/gameplan.bundle.js",
"homepage": "https://frappe.io/gameplan",
"repository": {
"type": "git",
"url": "https://github.com/alazab-group/gameplan.git"
},
"license": "AGPL-3.0",
"dependencies": {
"@babel/core": "^7.23.5",
"@babel/preset-env": "^7.23.5",
"@fortawesome/fontawesome-free": "^6.5.0",
"bootstrap": "^4.6.2",
"chart.js": "^4.4.0",
"codemirror": "^5.65.16",
"cropperjs": "^1.6.1",
"dayjs": "^1.11.10",
"dropzone": "^5.9.3",
"frappe-gantt": "^0.6.1",
"jquery": "^3.7.1",
"jquery-ui": "^1.13.2",
"leaflet": "^1.9.4",
"lodash": "^4.17.21",
"popper.js": "^1.16.1",
"quill": "^1.3.7",
"socket.io-client": "^4.7.4",
"sortablejs": "^1.15.1",
"summernote": "^0.8.20",
"vue": "^3.3.8",
"vue-router": "^4.2.5",
"pinia": "^2.1.7",
"@vueuse/core": "^10.5.0",
"tailwindcss": "^3.3.6",
"@headlessui/vue": "^1.7.16",
"@heroicons/vue": "^2.0.18",
"prismjs": "^1.29.0",
"highlight.js": "^11.9.0",
"markdown-it": "^13.0.2",
"dompurify": "^3.0.5",
"emoji-js": "^8.0.0",
"mention.js": "^1.5.0"
},
"devDependencies": {
"@babel/cli": "^7.23.4",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-multi-entry": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"chokidar": "^3.5.3",
"postcss": "^8.4.32",
"rollup": "^4.6.1",
"rollup-plugin-postcss": "^4.0.2",
"sass": "^1.69.5",
"autoprefixer": "^10.4.16"
},
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w",
"production": "NODE_ENV=production rollup -c",
"docker:build": "NODE_ENV=production npm run build",
"docker:watch": "npm run watch",
"docker:start": "npm run production && supervisord -c /etc/supervisor/supervisord.conf",
"test": "echo \"Error: no test specified\" && exit 1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 11"
],
"engines": {
"node": ">=18.0.0",
"npm": ">=9.0.0"
}
}
Loading