mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
a9e29279ea
Squash commit of storybook addition to aid design system documentation efforts. The older commit titles were: * Initial storybook commit * Fix documentation.json links * Don't track documentation.json in git * Enable sass in storybook * Initial version of a story that uses angular components * Remove example stories, clean up button story * More example stories * Fix sb build * Always use dev * Try without auth header * Update workflow name * More logs * Check if token set * Use release/storybook branch for testing * Send ref input to workflow * Escape input to curl call * Adding logging * Different type of escaping * Fix JOSN * Use dev branch for opf/design-system storybook publishing * Add plugin to message path to parent window * Remove extraneous story * Add a ton of docs * Update stories * Fix syntax error caused by multiple newlines inside of a JSX component * Add text-field story * Add basic html stories that don't work yet * Try to get plain HTML examples working * HTML Examples work, but slowly revert to components anyway * Fix HTML examples * Remove extraneous files * Put storybook eslint rules back in * Improve docs * Show docs tab by default * Add pullpreview for storybook * Use the same pullpreview tag for both storybook and normal deployments * Change name of second pullpreview workflow * Pin node version to 16.17.0 * Initial update to docs Added/updated: Foundation pages: - Colours (major update) - Shadows (minor) - Typography (new) Blocks - Checkbox (minor) - Action bar (major) - Buttons (new) - Link (major) - Modal Dialogue (new) - Selector Field (new) * Make sure all code is available during storybook pp build * Change storybook pullpreview file name * Add production target to docker-compose sb pp * Fix acme check for sb pp * Only run cd-storybook on dev branch * Run without https on 8080 * Added intro and new page - Introduction renamed to "Design System", page rewritten completely - Added page "Devices and Accessibility" * Remove domain from caddy * Add port to listen command * Remove double pullpreview workflows * Added Divider component * Change sorting of stories * Update section titles and order for styles and blocks * add extra action bar story * Updated organising + new page - Updated organisation into Styles, Components and Patterns. - Added page "Using Storybook" (mostly a skeleton for now) * Added note about colours not being implemented yet * Minor Co-authored-by: Parimal Satyal <88370597+psatyal@users.noreply.github.com>
263 lines
6.3 KiB
YAML
263 lines
6.3 KiB
YAML
version: "3.7"
|
|
|
|
networks:
|
|
network:
|
|
testing:
|
|
|
|
volumes:
|
|
downloads-test:
|
|
pgdata:
|
|
tmp:
|
|
opdata:
|
|
bundle:
|
|
npm:
|
|
pgdata-test:
|
|
tmp-test:
|
|
fedata-test:
|
|
|
|
x-op-restart-policy: &restart_policy
|
|
restart: unless-stopped
|
|
x-op-build: &build
|
|
context: .
|
|
dockerfile: ./docker/dev/backend/Dockerfile
|
|
args:
|
|
DEV_UID: $DEV_UID
|
|
DEV_GID: $DEV_GID
|
|
x-op-image: &image
|
|
image:
|
|
openproject/dev:latest
|
|
x-op-frontend-build: &frontend-build
|
|
context: .
|
|
dockerfile: ./docker/dev/frontend/Dockerfile
|
|
args:
|
|
DEV_UID: $DEV_UID
|
|
DEV_GID: $DEV_GID
|
|
x-op-backend: &backend
|
|
build:
|
|
<<: *build
|
|
target: develop
|
|
<<: *image
|
|
<<: *restart_policy
|
|
environment:
|
|
LOCAL_DEV_CHECK: "${LOCAL_DEV_CHECK:?The docker-compose file for OpenProject has moved to https://github.com/opf/openproject-deploy}"
|
|
RAILS_ENV: development
|
|
RAILS_CACHE_STORE: file_store
|
|
OPENPROJECT_CACHE__MEMCACHE__SERVER: cache:11211
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
|
DATABASE_URL: postgresql://${DB_USERNAME:-postgres}:${DB_PASSWORD:-postgres}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_DATABASE:-openproject}
|
|
OPENPROJECT_EDITION: $OPENPROJECT_EDITION
|
|
volumes:
|
|
- ".:/home/dev/openproject"
|
|
- "opdata:/var/openproject/assets"
|
|
- "bundle:/usr/local/bundle"
|
|
- "tmp:/home/dev/openproject/tmp"
|
|
networks:
|
|
- network
|
|
|
|
services:
|
|
backend:
|
|
<<: *backend
|
|
tty: true
|
|
stdin_open: true
|
|
command: run-app
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
|
|
worker:
|
|
<<: *backend
|
|
command: bundle exec rake jobs:work
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
|
|
frontend:
|
|
build:
|
|
<<: *frontend-build
|
|
command: "npm run serve"
|
|
volumes:
|
|
- ".:/home/dev/openproject"
|
|
- "${CKEDITOR_BUILD_DIR:-./frontend/src/vendor/ckeditor/}:/home/dev/openproject/frontend/src/vendor/ckeditor/"
|
|
ports:
|
|
- "4200:4200"
|
|
- "9999:9999"
|
|
environment:
|
|
PROXY_HOSTNAME: backend
|
|
networks:
|
|
- network
|
|
depends_on:
|
|
- backend
|
|
|
|
storybook:
|
|
build:
|
|
<<: *frontend-build
|
|
command: "npm run storybook:serve"
|
|
volumes:
|
|
- ".:/home/dev/openproject"
|
|
ports:
|
|
- "6006:6006"
|
|
networks:
|
|
- network
|
|
|
|
db:
|
|
image: postgres:13
|
|
<<: *restart_policy
|
|
stop_grace_period: "3s"
|
|
volumes:
|
|
- "pgdata:/var/lib/postgresql/data"
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: ${DB_USERNAME:-postgres}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${DB_DATABASE:-openproject}
|
|
networks:
|
|
- network
|
|
|
|
cache:
|
|
image: memcached
|
|
<<: *restart_policy
|
|
networks:
|
|
- network
|
|
|
|
######### Testing stuff below ############
|
|
|
|
db-test:
|
|
image: postgres:13
|
|
stop_grace_period: "3s"
|
|
volumes:
|
|
- "pgdata-test:/var/lib/postgresql/data"
|
|
ports:
|
|
- "5433:5432"
|
|
environment:
|
|
POSTGRES_DB: openproject
|
|
POSTGRES_USER: openproject
|
|
POSTGRES_PASSWORD: openproject
|
|
networks:
|
|
- testing
|
|
|
|
frontend-test:
|
|
build:
|
|
<<: *frontend-build
|
|
command: "npm run serve:test"
|
|
volumes:
|
|
- ".:/home/dev/openproject"
|
|
- "fedata-test:/home/dev/openproject/public/assets/frontend"
|
|
environment:
|
|
PROXY_HOSTNAME: backend-test
|
|
CHROME_BIN: chromium
|
|
networks:
|
|
- testing
|
|
|
|
backend-test:
|
|
build:
|
|
<<: *build
|
|
target: test
|
|
command: setup-tests
|
|
hostname: backend-test
|
|
networks:
|
|
- testing
|
|
depends_on:
|
|
- db-test
|
|
- selenium-hub
|
|
- frontend-test
|
|
environment:
|
|
RAILS_ENV: test
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
|
DATABASE_URL: postgresql://openproject:openproject@db-test/openproject
|
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
|
|
SELENIUM_GRID_URL: http://selenium-hub:4444/wd/hub
|
|
CAPYBARA_SERVER_PORT: 3000
|
|
CAPYBARA_DYNAMIC_BIND_IP: 1
|
|
CAPYBARA_APP_HOSTNAME: backend-test
|
|
OPENPROJECT_CLI_PROXY: http://frontend-test:4200
|
|
OPENPROJECT_TESTING_NO_HEADLESS: "true"
|
|
OPENPROJECT_TESTING_AUTO_DEVTOOLS: "true"
|
|
volumes:
|
|
- ".:/home/dev/openproject"
|
|
- "fedata-test:/home/dev/openproject/public/assets/frontend"
|
|
- "opdata:/var/openproject/assets"
|
|
- "bundle:/usr/local/bundle"
|
|
- "tmp-test:/home/dev/openproject/tmp"
|
|
- "./tmp/capybara:/home/dev/openproject/tmp/capybara"
|
|
|
|
# https://vitobotta.com/2019/09/04/rails-parallel-system-tests-selenium-docker/
|
|
selenium-hub:
|
|
image: selenium/hub:4.0
|
|
container_name: selenium-hub
|
|
hostname: selenium-hub
|
|
environment:
|
|
GRID_MAX_SESSION: "${CI_JOBS:-4}"
|
|
depends_on:
|
|
- chrome
|
|
- firefox
|
|
- opera
|
|
networks:
|
|
- testing
|
|
ports:
|
|
- "4442-4444:4442-4444"
|
|
|
|
chrome:
|
|
image: selenium/node-chrome:4.0
|
|
volumes:
|
|
- /dev/shm:/dev/shm
|
|
- "downloads-test:/home/seluser/Downloads"
|
|
networks:
|
|
- testing
|
|
ports:
|
|
- "5900-5915:5900"
|
|
shm_size: 2g
|
|
environment:
|
|
SE_EVENT_BUS_HOST: selenium-hub
|
|
SE_EVENT_BUS_PUBLISH_PORT: 4442
|
|
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
|
|
SCREEN_WIDTH: 1920
|
|
SCREEN_HEIGHT: 1080
|
|
# in case we want multiple sessions per container
|
|
NODE_MAX_INSTANCES: "${CI_JOBS:-4}"
|
|
NODE_MAX_SESSION: "${CI_JOBS:-4}"
|
|
|
|
firefox:
|
|
image: selenium/node-firefox:4.0
|
|
volumes:
|
|
- /dev/shm:/dev/shm
|
|
- "downloads-test:/home/seluser/Downloads"
|
|
networks:
|
|
- testing
|
|
ports:
|
|
- "5916-5931:5900"
|
|
shm_size: 2g
|
|
environment:
|
|
SE_EVENT_BUS_HOST: selenium-hub
|
|
SE_EVENT_BUS_PUBLISH_PORT: 4442
|
|
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
|
|
SCREEN_WIDTH: 1920
|
|
SCREEN_HEIGHT: 1080
|
|
# in case we want multiple sessions per container
|
|
NODE_MAX_INSTANCES: "${CI_JOBS:-4}"
|
|
NODE_MAX_SESSION: "${CI_JOBS:-4}"
|
|
|
|
opera:
|
|
image: selenium/node-opera:4.0
|
|
volumes:
|
|
- /dev/shm:/dev/shm
|
|
- "downloads-test:/home/seluser/Downloads"
|
|
networks:
|
|
- testing
|
|
ports:
|
|
- "5932-5957:5900"
|
|
environment:
|
|
SE_EVENT_BUS_HOST: selenium-hub
|
|
SE_EVENT_BUS_PUBLISH_PORT: 4442
|
|
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
|
|
SCREEN_WIDTH: 1920
|
|
SCREEN_HEIGHT: 1080
|
|
# in case we want multiple sessions per container
|
|
NODE_MAX_INSTANCES: "${CI_JOBS:-4}"
|
|
NODE_MAX_SESSION: "${CI_JOBS:-4}"
|
|
|
|
|
|
# Volumes below here
|