Alternate docker-compose reusing the official Dockerfile

pull/4273/head
Cyril Rohr 9 years ago
parent 85f106f45c
commit c048c7b58d
  1. 35
      doc/QUICK_START.md
  2. 31
      docker-compose.yml
  3. 8
      docker/webpack-watch

@ -34,7 +34,40 @@ Detailed installation instructions for different platforms are located on the [O
You can find information on configuring OpenProject in [`config/CONFIGURATION.md`](CONFIGURATION.md).
## Fast install
## Fast install (Docker version)
### Prerequisites
* Git
* [Docker Engine](https://docs.docker.com/engine/installation/)
* [Docker Compose](https://docs.docker.com/compose/)
### Building and running
1. Build the image (this will take some time)
docker-compose build
2. Start and setup the database
docker-compose up -d db
docker-compose run db rake db:create db:migrate db:seed
3. Start the other processes
docker-compose up
Assets should be automatically recompiled anytime you make a change, and your
ruby code should also be reloaded when you change a file locally.
You can run arbitrary commands in the context of the application by using
`docker-compose run`. For instance:
docker-compose run web rake db:migrate
docker-compose run web rails c
...
## Fast install (manual)
These are generic (and condensed) installation instructions for the **current dev** branch *without plugins*, and optimised for a development environment. Refer to the OpenProject website for instructions for the **stable** branch, OpenProject configurations with plugins, as well as platform-specific guides.

@ -0,0 +1,31 @@
db:
image: mysql
volumes:
- ~/.docker-volumes/openproject/db:/var/lib/mysql
expose:
- "3306"
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
worker: &ruby
build: .
volumes:
- .:/usr/src/app
links:
- db
environment:
- "DATABASE_URL=mysql2://root@db/openproject_development?encoding=utf8"
- "RAILS_CACHE_STORE=file_store"
command: "./docker/worker"
web:
<<: *ruby
ports:
- "8080:8080"
command: "./docker/web"
frontend:
build: .
volumes:
- .:/usr/src/app
command: "./docker/webpack-watch"

@ -0,0 +1,8 @@
#!/bin/bash
set -e
npm install
cd frontend
exec $(npm bin)/webpack --colors --watch --progress
Loading…
Cancel
Save