Reimport docker-compose

This commit is contained in:
Cyril Rohr
2020-11-05 13:27:23 +00:00
parent 0823e103c3
commit c6f12463e5
3 changed files with 143 additions and 0 deletions

1
.env.example Normal file
View File

@@ -0,0 +1 @@
PORT=8080

View File

@@ -2,4 +2,48 @@
Recipes and examples for deploying OpenProject using Docker, Docker Compose, Kubernetes, etc. Recipes and examples for deploying OpenProject using Docker, Docker Compose, Kubernetes, etc.
## Docker Compose
### Install
Clone this repository:
git clone https://github.com/opf/openproject-deploy --depth=1 --branch=stable/11 openproject
Go to the folder that was just created:
cd openproject
Launch the containers:
docker-compose up -d
After a while, OpenProject should be up and running on <http://localhost:8080>.
### Configuration
If you want to specify a different port, you can do so with:
PORT=4000 docker-compose up -d
If you want to specify a custom tag for the OpenProject docker image, you can do so with:
TAG=my-docker-tag docker-compose up -d
You can also set those variables into an `.env` file at the root of the
directory, and Docker Compose will pick it up automatically. See `.env.example`
for details.
### Uninstall
You can remove the stack with:
docker-compose down
### Troubleshooting
You can look at the logs with:
docker-compose logs -n 1000
For the complete documentation, please refer to https://docs.openproject.org/installation-and-operations/. For the complete documentation, please refer to https://docs.openproject.org/installation-and-operations/.

98
docker-compose.yml Normal file
View File

@@ -0,0 +1,98 @@
version: "3.7"
networks:
frontend:
backend:
volumes:
pgdata:
opdata:
x-op-restart-policy: &restart_policy
restart: unless-stopped
x-op-image: &image
image: openproject/community:${TAG:-11}
x-op-app: &app
<<: *image
<<: *restart_policy
environment:
RAILS_CACHE_STORE: "memcache"
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
DATABASE_URL: "postgres://postgres:p4ssw0rd@db/openproject"
USE_PUMA: "true"
# set to true to enable the email receiving feature. See ./docker/cron for more options
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
volumes:
- "opdata:/var/openproject/assets"
services:
db:
image: postgres:10
<<: *restart_policy
stop_grace_period: "3s"
volumes:
- "pgdata:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: p4ssw0rd
POSTGRES_DB: openproject
networks:
- backend
cache:
image: memcached
<<: *restart_policy
networks:
- backend
proxy:
<<: *image
<<: *restart_policy
command: "./docker/proxy"
ports:
- "${PORT:-8080}:80"
environment:
APP_HOST: web
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
depends_on:
- web
networks:
- frontend
web:
<<: *app
command: "./docker/web"
networks:
- frontend
- backend
depends_on:
- db
- cache
- seeder
worker:
<<: *app
command: "./docker/worker"
networks:
- backend
depends_on:
- db
- cache
- seeder
cron:
<<: *app
command: "./docker/cron"
networks:
- backend
depends_on:
- db
- cache
- seeder
seeder:
<<: *app
command: "./docker/seeder"
restart: on-failure
networks:
- backend