OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/docker-compose.yml

245 lines
6.0 KiB

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
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
Epic/placeholder users frontend (#8977) * Add new button added to select-edit-field * Permissions Service + show button if canInviteUsersToProject * Permissions Service + show button if canInviteUsersToProject * Add initial invite user modal * Small change to invite user modal * Small use rmodal changes * Builds * Added invite user modal title translation * Changed modal to module * Figured out basic modal setup * Fixed build * Started adding option-list component * Adding reactive forms * vim * Reactive forms working for option-list * op-form-field is implemented, project-selection step works * Working on principal step * Basics of principal selection are done * Remove console logs * Added role step and role api bindings, updated directory structure * Added basics of message step * Added summary page * Add in-project check for selected principal * Add documentation for principal filters * Create modal-heading component * Fix principal emit * Add API calls to summary component * Work on translations, rework close fn * Added translations * Fixed styling * Add autofocus, fix typing * Improve typing * Add form-binding directive to fix form-field * Fixed typescript errors * Fix more translations * Codeclimate and TSLint errors * Failing test commented with TODO * Codeclimate fixes * Codeclimate fixes * Open invite user modal from user selection * Remove console and debugger calls * Opening modal from CreateAutocompleterComponent * Add new button added to select-edit-field * Permissions Service + show button if canInviteUsersToProject * Permissions Service + show button if canInviteUsersToProject * Codeclimate and TSLint errors * Failing test commented with TODO * Codeclimate fixes * Codeclimate fixes * Add initial invite user modal * Small change to invite user modal * Small use rmodal changes * Builds * Added invite user modal title translation * Changed modal to module * Figured out basic modal setup * Fixed build * Started adding option-list component * Adding reactive forms * vim * Reactive forms working for option-list * op-form-field is implemented, project-selection step works * Working on principal step * Basics of principal selection are done * Remove console logs * Added role step and role api bindings, updated directory structure * Added basics of message step * Added summary page * Add in-project check for selected principal * Add documentation for principal filters * Create modal-heading component * Fix principal emit * Add API calls to summary component * Work on translations, rework close fn * Added translations * Fixed styling * Add autofocus, fix typing * Improve typing * Add form-binding directive to fix form-field * Fixed typescript errors * Fix more translations * Refactor/op modal (#8978) * Initial modal refactoring * Updated modal imports * More modal module imports * Fix one more import * Fixed some styles * Fixed failing modal specs * Fix more spec selectors * Fix more specs * Updated backend modals * Improved code style * Fix export modal styles * Fix wiki export modal * Fix more specs * Fix webhooks modal * Added loading indicator back into modals * Fixed wp preview modal * InviteUserButtonComponent in * InviteUserButtonComponent in * InviteUserButtonComponent in MultiSelectEditFieldComponent and SelectEditFieldComponent * Remove extraneous module * Add Dragula import * Remove empty spec * Fix option-list component * Remove group creation from invite user modal * Write feature spec * Fix TS errors * Add Placeholder and Group apis to the frontend * Better api typing * Remove unnecessary interface * Remove group creation call Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com> Co-authored-by: Oliver Günther <mail@oliverguenther.de> Co-authored-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
4 years ago
db:
image: postgres:13
Epic/placeholder users frontend (#8977) * Add new button added to select-edit-field * Permissions Service + show button if canInviteUsersToProject * Permissions Service + show button if canInviteUsersToProject * Add initial invite user modal * Small change to invite user modal * Small use rmodal changes * Builds * Added invite user modal title translation * Changed modal to module * Figured out basic modal setup * Fixed build * Started adding option-list component * Adding reactive forms * vim * Reactive forms working for option-list * op-form-field is implemented, project-selection step works * Working on principal step * Basics of principal selection are done * Remove console logs * Added role step and role api bindings, updated directory structure * Added basics of message step * Added summary page * Add in-project check for selected principal * Add documentation for principal filters * Create modal-heading component * Fix principal emit * Add API calls to summary component * Work on translations, rework close fn * Added translations * Fixed styling * Add autofocus, fix typing * Improve typing * Add form-binding directive to fix form-field * Fixed typescript errors * Fix more translations * Codeclimate and TSLint errors * Failing test commented with TODO * Codeclimate fixes * Codeclimate fixes * Open invite user modal from user selection * Remove console and debugger calls * Opening modal from CreateAutocompleterComponent * Add new button added to select-edit-field * Permissions Service + show button if canInviteUsersToProject * Permissions Service + show button if canInviteUsersToProject * Codeclimate and TSLint errors * Failing test commented with TODO * Codeclimate fixes * Codeclimate fixes * Add initial invite user modal * Small change to invite user modal * Small use rmodal changes * Builds * Added invite user modal title translation * Changed modal to module * Figured out basic modal setup * Fixed build * Started adding option-list component * Adding reactive forms * vim * Reactive forms working for option-list * op-form-field is implemented, project-selection step works * Working on principal step * Basics of principal selection are done * Remove console logs * Added role step and role api bindings, updated directory structure * Added basics of message step * Added summary page * Add in-project check for selected principal * Add documentation for principal filters * Create modal-heading component * Fix principal emit * Add API calls to summary component * Work on translations, rework close fn * Added translations * Fixed styling * Add autofocus, fix typing * Improve typing * Add form-binding directive to fix form-field * Fixed typescript errors * Fix more translations * Refactor/op modal (#8978) * Initial modal refactoring * Updated modal imports * More modal module imports * Fix one more import * Fixed some styles * Fixed failing modal specs * Fix more spec selectors * Fix more specs * Updated backend modals * Improved code style * Fix export modal styles * Fix wiki export modal * Fix more specs * Fix webhooks modal * Added loading indicator back into modals * Fixed wp preview modal * InviteUserButtonComponent in * InviteUserButtonComponent in * InviteUserButtonComponent in MultiSelectEditFieldComponent and SelectEditFieldComponent * Remove extraneous module * Add Dragula import * Remove empty spec * Fix option-list component * Remove group creation from invite user modal * Write feature spec * Fix TS errors * Add Placeholder and Group apis to the frontend * Better api typing * Remove unnecessary interface * Remove group creation call Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com> Co-authored-by: Oliver Günther <mail@oliverguenther.de> Co-authored-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
4 years ago
<<: *restart_policy
stop_grace_period: "3s"
volumes:
- "pgdata:/var/lib/postgresql/data"
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"
Finish user invite modal (#9061) * Fix some ium stylings * Extend create service to also test with empty names * Add PrincipalLike type to pass around non-created placeholder refs * Add icon-context * Move principal rendering to its own module * Fix emit create new placeholder to principals * Revert op-principal for now * Add memberships form API to properly post * Fix types for returned principals * Move untilDestroyed in role * Filter input if not string in role-search * Pass correct inputs to success component * Return principal after saving membership * Fix small stuff around the ium * Fix the way HalResources are selected and passed * Move principal module to be exported by common * Disable quotemark in tslint until eslint is enabled * Fix image path in success * Adapt modal to run all steps in one within the modal helper component * Several fixes to modals * Fix ium success component styles, * Registration modal y-overflow * Add SMTP parameters to .env.example * Add disabled option to op-option-list, disabled placeholder users for non-ee instances * Add correct ee link to placeholder user option * Fix build * Removed unused sass files * Fix principal search not found indicator, added placeholder add image * Fix enterprise edition url, use dirty instead of touched check * Use backend class names for frontend principal types * Fix duplicate import and principal type usage * Also disable banners if with_ee is present in test * Extend specs for placeholders * Fix disabled attribute * Extend spec WIP * Improved inline-validation styles, fixed more PrincipalType usages * Add group happy path test, fix more PrincipalType usage * Fix a translation * Revert line deletion * Rewrite same spec examples into shared examples * Fix name of shared example * Dont run assets:clean to remove angular assets * Output whether assets are there at all * Fix placeholder path * Revert "Output whether assets are there at all" This reverts commit 42219c27556c0eb155c7fcf1606345da6a819cc2. Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
4 years ago
ports:
- "5432: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}"