This page contains information about how to set up a local development environment for BlueSpice.
Local development environment based on bluespice-deploy
A developer can use the default deployment stack and alter is to quickly set up a development environment. To do so, first clone the stack to your local machine and navigate into it:
git clone -b 5.2.x git@github.com:hallowelt/bluespice-deploy.git
cd bluespice-deploy/compose
Create a proper .env file from the .env.sample and alter/add the following lines:
DATADIR=~/workspace/REL1_43-5.2.x/data
CODEDIR=~/workspace/REL1_43-5.2.x/code
SMTP_HOST=mailhog
SMTP_PORT=1025
Create a docker-compose.override.yml file with the following content:
x-common-dev: &x-common
image: docker.bluespice.com/bluespice-qa/wiki:latest
volumes:
- ${CODEDIR}:/app/bluespice/w/
services:
wiki-installer:
<<: *x-common
wiki-web:
<<: *x-common
restart: no
wiki-task:
<<: *x-common
restart: no
mailhog:
image: mailhog/mailhog
container_name: ${COMPOSE_PROJECT_NAME:-bluespice}-mailhog
environment:
VIRTUAL_HOST: ${WIKI_HOST}
VIRTUAL_PATH: /_mailhog/
VIRTUAL_PORT: 8025
VIRTUAL_DEST: /
restart: no
cache:
restart: no
collabpads:
restart: no
collabpads-database:
restart: no
database:
restart: no
diagram:
restart: no
formula:
restart: no
pdf:
restart: no
proxy:
restart: no
search:
restart: no
wire:
restart: no
This will make the stack use your local codebase from $CODEDIR and also expose a Mailhog web interface on $Wiki_HOST/_mailhog.
In addition, if you want to work with a custom build of the bluespice/wiki container, you can add an image: entry to the respective services. Example
wiki-installer:
image: bluespice/wiki:dev
...
wiki-web:
image: bluespice/wiki:dev
...
wiki-task:
image: bluespice/wiki:dev
...
or you set
BLUESPICE_WIKI_IMAGE=bluespice/wiki:dev
in your .env-File
Add S3 filestore service
When working on the S3 filestore features, a developer needs a
x-common-dev: &x-common
...
environment:
FILESTORE_HOST: filestore
FILESTORE_PORT: 9000
FILESTORE_PROTOCOL: http
FILESTORE_ACCESS_KEY: ${FILESTORE_ACCESS_KEY}
FILESTORE_SECRET_KEY: ${FILESTORE_SECRET_KEY}
FILESTORE_BUCKET_NAME: ${FILESTORE_BUCKET_NAME:-bluespice}
FILESTORE_REGION: ${FILESTORE_REGION:-eu-north-1}
...
filestore:
image: minio/minio:latest
container_name: ${COMPOSE_PROJECT_NAME:-bluespice}-filestore
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${FILESTORE_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${FILESTORE_SECRET_KEY}
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ${DATADIR}/filestore:/data
restart: no
In .env
FILESTORE_ACCESS_KEY=...
FILESTORE_SECRET_KEY=...
FILESTORE_BUCKET_NAME=bluespice
FILESTORE_REGION=eu-north-1
After a /bluespice-deploy up -d you can access the MINIO webinterface in your browser at http://localhost:9001. Use the values of FILESTORE_ACCESS_KEY and FILESTORE_SECRET_KEY to log in.