feat(intellisense) ()

* feat(hooks):
- add: entrypoint hooks volume
- add: change-owner.sh script

* feat(apache):
- update: Dockerfile apache user and id
- delete: hooks setup
- add: .env setup
- add: theme volume
- update: turn off debugger at start

* feat(.env):
- add: .env example file

* fix(docker):
- add: theme volume

* fix(docker):
- revert: xdebug start config

* feat(docker):
- update: reduce the volumes to lib and apps

* chore(env):
- add: swarm api key in example

* chore(env):
- add: env file instructions
- fix: typos
This commit is contained in:
Mahyar Iranibazaz 2024-07-19 16:12:30 +08:00 committed by GitHub
parent b03a7f624b
commit 7d8e260a83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 20 deletions

14
.env.example Normal file
View file

@ -0,0 +1,14 @@
WWWUSER=1000
WWWGROUP=1000
APACHE_RUN_USER=www-user
APACHE_RUN_GROUP=www-group
DB_NAME=nextcloud
DB_USER=nextcloud
DB_PASSWORD=nextcloud
DB_ROOT_PASSWORD=rootpassword
NC_ADMIN_USER=swarmbox
NC_ADMIN_PASSWORD=swarmbox
SWARM_ACCESS_API_TOKEN=Nz5lDX7PpPGrcdAI5SjPZHVdZJe12AuMOrKfZXaL

View file

@ -30,12 +30,13 @@ For setting up a Bee node please have a look at the [official documentation](htt
The following steps explain how to configure a Bee node in Nextcloud.
- Run this command to start the development enviroment `docker compose up`, wait 10 seconds and naviagate to `localhost`
- Create a `.env` file in the project root by copying the `.env.example` file and adjusting its values accordingly.
- Run this command to start the development environment `docker compose up`, wait 10 seconds and navigate to `localhost`
- Navigate to Profile menu -> Apps and make sure the "External Storage support" and "External Storage: Swarm" plugins are enabled
- Navigate to External Storage Administration (Profile menu -> Administration Settings -> External Storage)
- Add the connection settings for a new Bee node, **make sure** Authentiation: none, Configuration is pointing to an active Bee node, and Available for: All users
- Add the connection settings for a new Bee node, **make sure** Authentication: none, Configuration is pointing to an active Bee node, and Available for: All users
- Navigate to Ethswarm Storage Administration (Profile menu -> Administration Settings -> Ethswarm Storage)
- Configure the Bee node - by default, encryption is active, **make sure** stamp batch is actived by using the toggle
- Configure the Bee node - by default, encryption is active, **make sure** stamp batch is activated by using the toggle
- To use a Bee node, it is necessary to [Purchase a Batch of new stamps](https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive) from the funds in the node's wallet account
- Once the new batch is purchased, a unique batchId is generated. Once your batch has been purchased, it will take a few minutes for other Bee nodes in the Swarm to catch up and register your batch. Allow some time for your batch to propagate in the network before proceeding to the next step. This is indicated by the checkbox "Usable".
- Uploading files to the swarm costs Bzz, so it is necessary to select a Batch as "Active". Only 1 batch is allowed to be Active for a given Bee node. Then click "Save Settings".

View file

@ -1,7 +1,6 @@
volumes:
mariadb:
nextcloud_data:
nextcloud_config:
nextcloud_app:
networks:
frontend:
@ -21,10 +20,10 @@ services:
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
nextcloud:
build:
@ -39,21 +38,25 @@ services:
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- nextcloud_data:/var/www/html/data
- nextcloud_config:/var/www/html/config
- ./dev-environment/nextcloud_source:/var/www/html
- nextcloud_app:/var/www/html
- ./:/var/www/html/custom_apps/files_external_ethswarm
- ./dev-environment/nextcloud_source/lib:/var/www/html/lib
- ./dev-environment/nextcloud_source/apps:/var/www/html/apps
ports:
- "80:80"
- "443:443"
environment:
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud
WWWUSER: ${WWWUSER}
WWWGROUP: ${WWWGROUP}
APACHE_RUN_USER: ${APACHE_RUN_USER}
APACHE_RUN_GROUP: ${APACHE_RUN_GROUP}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_HOST: mariadb:3306
NEXTCLOUD_ADMIN_USER: swarmbox
NEXTCLOUD_ADMIN_PASSWORD: swarmbox
SWARM_ACCESS_API_TOKEN: Nz5lDX7PpPGrcdAI5SjPZHVdZJe12AuMOrKfZXaL
NEXTCLOUD_ADMIN_USER: ${NC_ADMIN_USER}
NEXTCLOUD_ADMIN_PASSWORD: ${NC_ADMIN_PASSWORD}
SWARM_ACCESS_API_TOKEN: ${SWARM_ACCESS_API_TOKEN}
adminer:
image: adminer

View file

@ -16,5 +16,11 @@ RUN pecl install xdebug; \
ENV NEXTCLOUD_UPDATE=1
RUN mkdir /var/www/html/custom_apps
RUN chown www-data:www-data -R /var/www/html/custom_apps
ENV WWWUSER=1000
ENV WWWGROUP=1000
ENV APACHE_RUN_USER=www-user
ENV APACHE_RUN_GROUP=www-group
RUN groupadd -g $WWWGROUP $APACHE_RUN_GROUP
RUN useradd -u $WWWUSER -g $APACHE_RUN_GROUP $APACHE_RUN_USER
RUN mkdir -p /var/www/html/custom_apps
RUN chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP /var/www/html/custom_apps