Skip to content

Commit

Permalink
point one
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Feb 11, 2022
1 parent 7e769f1 commit f2a8cf3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,43 @@ The account configuration happens in the "Connected accounts" user settings sect

To be able to periodically check activity in OpenProject (when "notifications for activity in my work packages" is enabled), you need to choose the "Cron" background job method and set a system cron task calling cron.php as explained in the [documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron).

## Development
Develop using docker

Requirements:
- docker cli
- openproject instance running somewhere
- integration app with build files

### Environments
- `APP_DIR` => location where the integration_app is cloned => defaults to './../integration_openproject'

### Start compose
```shell
docker login
APP_DIR='/path/to/app' docker-compose up -d
```

### chown apps dir

```shell
# change ownership of apps and custom_apps folder to www-data
docker exec integration_openproject_app_1 chown www-data custom_apps/ -R
docker exec --user www-data integration_openproject_app_1 php occ a:e integration_openproject
```

### access the NC server

at this point the nc server should be up and ready with our integration app

1. browse to http://localhost
2. create admin (postgresql is used with db: nextcloud, user: nextcloud, pass: nextcloud)
3. get an installed NC server

### app enable
You can browse as admin to the apps center and enable using the webUI.
Or,
Using the CLI as:

```shell
sudo mkdir -p /var/lib/openproject/{pgdata,assets}
docker exec --user www-data integration_openproject_app_1 php occ a:e integration_openproject
docker exec --user www-data integration_openproject_app_1 php occ config:system:set allow_local_remote_servers --value 1
```
36 changes: 8 additions & 28 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,40 @@
version: '3'
version: '3.9'

services:
# openproject:
# image: ${OPEN_PROJECT_IMAGE:-openproject/community:12}
# restart: always
# ports:
# - "8000:80"
# environment:
# - SERVER_HOST_NAME=openproject.example.com
# - SECRET_KEY_BASE=secret
# volumes:
# - /var/lib/openproject/pgdata:/var/openproject/pgdata
# - /var/lib/openproject/assets:/var/openproject/assets


db:
image: postgres:alpine
restart: always
ports:
- "2345:5432"
- "5433:5432"
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=nextcloud
extra_hosts:
- host.docker.internal:${DOCKER_HOST:-host-gateway}

redis:
image: redis:alpine
restart: always
extra_hosts:
- host.docker.internal:${DOCKER_HOST:-host-gateway}
ports:
- "6379:6379"

app:
image: nextcloud:apache
restart: always
ports:
- "8080:80"
network_mode: "host"
volumes:
- nextcloud:/var/www/html
- ${OCIS_WEB_CONFIG:-./../integration_openproject}:/var/www/html/custom_apps/integration_openproject
- ${APP_DIR:-./../integration_openproject}:/var/www/html/custom_apps/integration_openproject
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
- POSTGRES_HOST=localhost:5433
- REDIS_HOST=localhost
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=nextcloud
depends_on:
- db
- redis
extra_hosts:
- host.docker.internal:${DOCKER_HOST:-host-gateway}

cron:
image: nextcloud:apache
Expand All @@ -63,8 +45,6 @@ services:
depends_on:
- db
- redis
extra_hosts:
- host.docker.internal:${DOCKER_HOST:-host-gateway}

volumes:
db:
Expand Down

0 comments on commit f2a8cf3

Please sign in to comment.