Move development docker-compose file to the main directory (#8798)
* Move development docker-compose file to the main directory This requires us to move some other files around, like the pullpreview and example docker-compose file for production setups. This commit also does some housekeeping, like removing some old files and deduping configuration. * Updated to selenium grid * Fix in-Docker Selenium tests The Selenium tests now run inside a Docker Chrome Container. Backwards compatability with non-docker setups is not guaranteed, though it should not be hard to implement with a couple of small fixes. * Updated docker development documentation * Improved test timings, changed the documentation * Updated docker testing again * Run npm in the frontend directory * Really run npm in the frontend directory * Also run npm in frontend when setting up travis cache * Change directory for one command only * Change default test driver name * CI test change fixes * Fixed syntax error * Added dev check * Trying to fix firefox resizing * Trying to get tests running * Stop resizing firefox * Fixed apple icon spec * fix host in url helpers for omniauth spec * Fix omniauth specs * Fix docs * Small fixes to docker tests * Added package.json back in * Change env variables Co-authored-by: Markus Kahl <machisuji@gmail.com>pull/8845/head
parent
1453e28a6d
commit
5f45ee07ab
@ -1,37 +0,0 @@ |
||||
#-- copyright |
||||
# OpenProject is an open source project management software. |
||||
# Copyright (C) 2012-2020 the OpenProject GmbH |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See docs/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
# If you place a .env file into the root directory of OpenProject |
||||
# you can override some default settings that foreman will use |
||||
# to start OpenProject |
||||
|
||||
# override the default bind address |
||||
HOST=0.0.0.0 |
||||
|
||||
# override the default port |
||||
PORT=1337 |
@ -1,8 +0,0 @@ |
||||
#!/bin/sh |
||||
|
||||
set -e |
||||
|
||||
export DEV_UID=$(id -u) |
||||
export DEV_GID=$(id -g) |
||||
|
||||
docker-compose -f ./docker/dev/compose.yml $* |
@ -0,0 +1,14 @@ |
||||
#!/bin/sh |
||||
|
||||
set -e |
||||
set -u |
||||
|
||||
cmd="$@" |
||||
|
||||
echo 'Waiting for the Grid...' |
||||
while ! curl -sSL "${SELENIUM_GRID_URL}/status" 2>&1 \ |
||||
| jq -r '.value.ready' 2>&1 | grep "true" > /dev/null; do |
||||
sleep 1 |
||||
done |
||||
|
||||
exec $cmd |
@ -0,0 +1,19 @@ |
||||
#!/bin/sh |
||||
|
||||
set -e |
||||
|
||||
bundle binstubs parallel_tests |
||||
bundle exec rake db:migrate |
||||
bundle exec rake i18n:js:export openproject:plugins:register_frontend assets:rebuild_manifest assets:clean |
||||
cp -rp config/frontend_assets.manifest.json public/assets/frontend_assets.manifest.json |
||||
|
||||
echo "" |
||||
echo "" |
||||
echo "Ready for tests. Run" |
||||
echo " docker-compose exec backend-test bundle exec rspec" |
||||
echo "to start the full suite, or " |
||||
echo " docker-compose exec backend-test bundle exec rspec $tests" |
||||
echo "to run a subset" |
||||
|
||||
# Keep this container online |
||||
while true; do sleep 1000; done; |
@ -1,125 +0,0 @@ |
||||
version: "3.7" |
||||
|
||||
networks: |
||||
frontend: |
||||
backend: |
||||
test: |
||||
|
||||
volumes: |
||||
pgdata: |
||||
tmp: |
||||
opdata: |
||||
bundle: |
||||
pgdata-test: |
||||
tmp-test: |
||||
|
||||
x-op-restart-policy: &restart_policy |
||||
restart: unless-stopped |
||||
x-op-build: &build |
||||
context: . |
||||
dockerfile: ./backend/Dockerfile |
||||
args: |
||||
DEV_UID: $DEV_UID |
||||
DEV_GID: $DEV_GID |
||||
x-op-image: &image |
||||
image: |
||||
openproject/dev:latest |
||||
|
||||
services: |
||||
db: |
||||
image: postgres:9 |
||||
<<: *restart_policy |
||||
stop_grace_period: "3s" |
||||
volumes: |
||||
- "pgdata:/var/lib/postgresql/data" |
||||
environment: |
||||
POSTGRES_PASSWORD: postgres |
||||
POSTGRES_DB: openproject |
||||
networks: |
||||
- backend |
||||
|
||||
cache: |
||||
image: memcached |
||||
<<: *restart_policy |
||||
networks: |
||||
- backend |
||||
|
||||
backend: |
||||
build: |
||||
<<: *build |
||||
target: develop |
||||
<<: *image |
||||
<<: *restart_policy |
||||
command: run-app |
||||
ports: |
||||
- "3000:3000" |
||||
environment: |
||||
RAILS_ENV: development |
||||
RAILS_CACHE_STORE: memcache |
||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: cache:11211 |
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}" |
||||
OPENPROJECT_STORAGE_TMP__PATH: /tmp/op |
||||
DATABASE_URL: postgresql://postgres:postgres@db/openproject |
||||
volumes: |
||||
- "${OPENPROJECT_HOME:?Please set OPENPROJECT_HOME to the OpenProject root folder}:/home/dev/openproject" |
||||
- "opdata:/var/openproject/assets" |
||||
- "bundle:/usr/local/bundle" |
||||
- "tmp:/tmp/op" |
||||
depends_on: |
||||
- db |
||||
- cache |
||||
networks: |
||||
- backend |
||||
|
||||
frontend: |
||||
build: |
||||
context: . |
||||
dockerfile: ./frontend/Dockerfile |
||||
args: |
||||
DEV_UID: $DEV_UID |
||||
DEV_GID: $DEV_GID |
||||
command: "npm run serve" |
||||
volumes: |
||||
- "${OPENPROJECT_HOME:?Please set OPENPROJECT_HOME to the OpenProject root folder}:/home/dev/openproject" |
||||
ports: |
||||
- "4200:4200" |
||||
environment: |
||||
PROXY_HOSTNAME: backend |
||||
networks: |
||||
- frontend |
||||
- backend |
||||
depends_on: |
||||
- backend |
||||
|
||||
# The containers below are for testing |
||||
db-test: |
||||
image: postgres:9 |
||||
stop_grace_period: "3s" |
||||
volumes: |
||||
- "pgdata-test:/var/lib/postgresql/data" |
||||
environment: |
||||
POSTGRES_PASSWORD: postgres |
||||
POSTGRES_DB: openproject |
||||
networks: |
||||
- test |
||||
|
||||
backend-test: |
||||
build: |
||||
<<: *build |
||||
target: test |
||||
<<: *image |
||||
<<: *restart_policy |
||||
command: run-app |
||||
networks: |
||||
- test |
||||
environment: |
||||
RAILS_ENV: test |
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}" |
||||
DATABASE_URL: postgresql://postgres:postgres@db-test/openproject |
||||
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true" |
||||
OPENPROJECT_STORAGE_TMP__PATH: /tmp/op |
||||
volumes: |
||||
- "${OPENPROJECT_HOME:?Please set OPENPROJECT_HOME to the OpenProject root folder}:/home/dev/openproject" |
||||
- "opdata:/var/openproject/assets" |
||||
- "bundle:/usr/local/bundle" |
||||
- "tmp-test:/tmp/op" |
Before Width: | Height: | Size: 268 KiB |
Loading…
Reference in new issue