Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ USER_EMAIL ?= ${USER_NAME}@${DCAPE_DOMAIN}
IMAGE ?= nextcloud

#- docker image version from dcape
IMAGE_VER ?= 29-fpm-alpine
IMAGE_VER ?= 30-fpm-alpine

#- Redis container image version
REDIS_IMAGE_VER ?= 7.2-alpine
Expand Down Expand Up @@ -48,7 +48,7 @@ REDIS_PASS ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head
OO_IMAGE ?= onlyoffice/documentserver

#- OnlyOffice image version
OO_IMAGE_VER ?= 8.1
OO_IMAGE_VER ?= 8.2

#- OnlyOffice database
OO_PGDATABASE ?= onlyoffice
Expand Down Expand Up @@ -90,9 +90,13 @@ setup:
chown -R 82:82 ${APP_ROOT}/html ${APP_ROOT}/config ${APP_ROOT}/data ; \
$(MAKE) -s db-create db-create-oo

## Execute OCC command inside app container (php occ $OCC_CMD)
## Execute OCC command inside nextcloud container (php occ $OCC_CMD)
exec-occ:
$(MAKE) -s dc CMD='exec -ti -u www-data app php /var/www/html/occ ${OCC_CMD}'
$(MAKE) -s dc CMD='exec -ti -u www-data nextcloud php /var/www/html/occ ${OCC_CMD}'

## Execute cron command inside nextcloud container (php cron.php)
exec-cron:
$(MAKE) -s dc CMD='exec -ti -u www-data anextcloudpp php cron.php'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что значит anextcloudpp?


## Create OnlyOffice database
db-create-oo:
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ make up
## Using for operations/console

For OCC commands inside nextcloud container example:
```
```shell
make exec-occ OCC_CMD='config:system:set default_phone_region --value=RU'
```

For run cron jobs inside nextcloud container example:
```shell
make exec-cron'
```


## License

Copyright 2023 Aleksei Kovrizhkin <lekovr+dopos@gmail.com>, Andrey Pazychev <anp135+dopos@gmail.com>
Expand Down
16 changes: 6 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
services:

front:
app:
image: ${NGINX_IMAGE}:${NGINX_IMAGE_VER}
depends_on:
- app
- nextcloud
restart: always
labels:
- traefik.enable=true
- dcape.traefik.tag=${DCAPE_TAG}
- traefik.http.routers.${APP_TAG}-front.rule=Host(`${APP_SITE:?Must be set}`)
- traefik.http.routers.${APP_TAG}-front.tls=${USE_TLS}
- traefik.http.routers.${APP_TAG}-front.tls.certresolver=letsEncrypt
# hsts middleware defined in DCAPE/apps/traefik/docker-compose.inc.yml
- traefik.http.routers.${APP_TAG}-front.middlewares=hsts
- traefik.http.routers.${APP_TAG}.middlewares=hsts
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}/html:/var/www/html:ro
- ${APP_ROOT}/data:${DATA_DIR}:ro
- ${APP_ROOT}/etc/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro

app:
nextcloud:
image: ${IMAGE}:${IMAGE_VER}
hostname: ${APP_TAG}-app
hostname: ${APP_TAG}-nextcloud
restart: always
depends_on:
- cache
Expand All @@ -35,6 +30,7 @@ services:
- ${APP_ROOT}/data:${DATA_DIR}
- ${APP_ROOT}/config:/var/www/html/config
- ${APP_ROOT}/etc/php-fpm.d/zz-docker.conf:/usr/local/etc/php-fpm.d/zz-docker.conf:ro
- ${APP_ROOT}/etc/php/opcache-recommended.ini:/usr/local/etc/php/conf.d/opcache-recommended.ini:ro

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etc/php/opcache-recommended.ini ?

environment:
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_USER=${PGUSER}
Expand Down