Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

document memory requirements of running docker (#9139)

ulfertsba9bd5c5b9b1
diff --git a/docker/dev/backend/scripts/setup-tests b/docker/dev/backend/scripts/setup-tests
index 7981ed782b3..db508ecf0fc 100755
--- a/docker/dev/backend/scripts/setup-tests
+++ b/docker/dev/backend/scripts/setup-tests
@@ -9,9 +9,9 @@ cp -rp config/frontend_assets.manifest.json public/assets/frontend_assets.manife
echo ""
echo ""
echo "Ready for tests. Run"
-echo " docker-compose exec backend-test bundle exec rspec"
+echo " bin/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 " bin/compose exec backend-test bundle exec rspec path/to/some_spec.rb"
echo "to run a subset"
# Keep this container online
diff --git a/docs/development/development-environment-docker/README.md b/docs/development/development-environment-docker/README.md
index 3c410e3b858..48387fe1151 100644
--- a/docs/development/development-environment-docker/README.md
+++ b/docs/development/development-environment-docker/README.md
@@ -24,6 +24,14 @@ Once the containers are done booting you can access the application under http:/
If there is an `.env` file (see below) `bin/compose` will source it.
More details and options follow in the next section.
+<div class="alert alert-info" role="alert">
+
+docker-compose needs access to at least 4GB of RAM. E.g. for Mac, this requires to [increase the default limit of the virtualized host.](https://docs.docker.com/docker-for-mac/)
+
+Signs of lacking memory include an "Exit status 137" in the frontend container.
+
+</div>
+
## Setup
### 1) Checkout the code
@@ -54,13 +62,13 @@ directory will not end up with files owned by root.
```
# Start the database. It needs to be running to run migrations and seeders
-docker-compose up -d db
+bin/compose up -d db
# Install frontend dependencies
-docker-compose run frontend npm i
+bin/compose run frontend npm i
# Install backend dependencies, migrate, and seed
-docker-compose run backend setup
+bin/compose run backend setup
```
### 4) Start the stack
@@ -68,13 +76,13 @@ docker-compose run backend setup
The docker compose file also has the test containers defined. The easiest way to start only the development stack, use
```
-docker-compose up frontend
+bin/compose up frontend
```
To see the backend logs as well, use
```
-docker-compose up frontend backend
+bin/compose up frontend backend
```
This starts only the frontend and backend containers and their dependencies. This excludes the testing containers, which
@@ -117,13 +125,19 @@ If you want to reset the data you can delete the docker volumes via `docker volu
Start all linked containers and migrate the test database first:
```
-docker-compose up backend-test
+bin/compose up backend-test
```
Afterwards, you can start the tests in the running `backend-test` container:
```
-docker-compose run backend-test bundle exec rspec
+bin/compose run backend-test bundle exec rspec
+```
+
+or for running a particular test
+
+```
+bin/compose run backend-test bundle exec rspec path/to/some_spec.rb
```
Tests are ran within Selenium containers, on a small local Selenium grid. You can connect to the containers via VNC if