Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into production
- Loading branch information
Showing
475 changed files
with
28,630 additions
and
121,553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM mcr.microsoft.com/devcontainers/javascript-node:18 | ||
WORKDIR /opt | ||
# Should align with https://github.com/OneZoom/OZtree-docker/blob/main/Dockerfile | ||
RUN git clone --recursive https://github.com/web2py/web2py.git --depth 1 --branch v2.27.1 --single-branch web2py \ | ||
&& chown -R node:node web2py | ||
# Required to avoid build issue when running grunt | ||
ENV NODE_OPTIONS=--openssl-legacy-provider=0 | ||
ENV PATH=${PATH}:/opt/web2py/applications/OZtree/node_modules/.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "OZTree Dev", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "dev", | ||
"workspaceFolder": "/opt/web2py/applications/OZtree", | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/python:1": { | ||
"version": "3.10" | ||
} | ||
}, | ||
"forwardPorts": [ | ||
// This is automatically forwarded if using a local container, but not on Codespaces. | ||
8000 | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '3.8' | ||
services: | ||
dev: | ||
build: | ||
context: . | ||
dockerfile: dev.Dockerfile | ||
volumes: | ||
- type: bind | ||
source: .. | ||
target: /opt/web2py/applications/OZtree | ||
consistency: cached | ||
- original-repo:/opt/web2py/applications/OZtree_original:ro | ||
# Overrides default command so things don't shut down after the process ends. | ||
command: /bin/sh -c "while sleep 1000; do :; done" | ||
network_mode: service:web | ||
web: | ||
build: | ||
context: . | ||
dockerfile: web.Dockerfile | ||
args: | ||
IMAGE_NAME: ${WEB_IMAGE_NAME} | ||
volumes: | ||
- type: bind | ||
source: .. | ||
target: /opt/web2py/applications/OZtree | ||
consistency: cached | ||
- original-repo:/opt/web2py/applications/OZtree_original | ||
ports: | ||
- "8080:80" | ||
- "3307:3306" | ||
|
||
volumes: | ||
original-repo: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG IMAGE_NAME | ||
FROM ${IMAGE_NAME} | ||
# Based on https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_change-the-uidgid-of-an-existing-container-user | ||
# This changes the www-data UID to 1000 to match the default user on the host, so that when it | ||
# chowns everything to www-data, it doesn't make it so that the host user cannot write to the files | ||
# anymore. | ||
RUN groupmod --gid 1000 www-data \ | ||
&& usermod --uid 1000 --gid 1000 www-data \ | ||
&& chown -R 1000:1000 /opt/web2py/applications | ||
# Move the original source code into a shared volume, clearing out anything from past runs. | ||
RUN if [ -d /opt/web2py/applications/OZtree_original ]; then \ | ||
rm -rf /opt/web2py/applications/OZtree_original; \ | ||
fi \ | ||
&& mv /opt/web2py/applications/OZtree /opt/web2py/applications/OZtree_original |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/package-lock.json binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: OZTreeModule CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- production | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
- production | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test | ||
- run: ./node_modules/.bin/grunt compile-js | ||
- run: ./node_modules/.bin/grunt compile-js_dev | ||
- run: ./node_modules/.bin/grunt css | ||
- run: ./node_modules/.bin/grunt compress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.