Confluence container added (#2140)

* Confluence config added
* Confluence docs added
This commit is contained in:
Anton Sannikov 2019-06-19 11:19:20 +02:00 committed by Shao Yu-Lung (Allen)
parent 63fc1fde44
commit d1015e5e96
5 changed files with 86 additions and 0 deletions

View File

@ -1056,8 +1056,21 @@ _Note: You can customize the port on which beanstalkd console is listening by ch
<br>
<a name="Use-Confluence"></a>
## Use Confluence
1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example:
```bash
docker-compose up -d confluence
```
2 - Open your browser and visit the localhost on port **8090**: `http://localhost:8090`
**Note:** You can you trial version and then you have to buy a licence to use it.
You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/)
<br> <br>
<a name="Use-ElasticSearch"></a> <a name="Use-ElasticSearch"></a>

View File

@ -41,6 +41,8 @@ volumes:
driver: ${VOLUMES_DRIVER} driver: ${VOLUMES_DRIVER}
mosquitto: mosquitto:
driver: ${VOLUMES_DRIVER} driver: ${VOLUMES_DRIVER}
confluence:
driver: ${VOLUMES_DRIVER}
sonarqube: sonarqube:
driver: ${VOLUMES_DRIVER} driver: ${VOLUMES_DRIVER}
@ -436,6 +438,10 @@ services:
- SONARQUBE_POSTGRES_DB=${SONARQUBE_POSTGRES_DB} - SONARQUBE_POSTGRES_DB=${SONARQUBE_POSTGRES_DB}
- SONARQUBE_POSTGRES_USER=${SONARQUBE_POSTGRES_USER} - SONARQUBE_POSTGRES_USER=${SONARQUBE_POSTGRES_USER}
- SONARQUBE_POSTGRES_PASSWORD=${SONARQUBE_POSTGRES_PASSWORD} - SONARQUBE_POSTGRES_PASSWORD=${SONARQUBE_POSTGRES_PASSWORD}
- POSTGRES_CONFLUENCE_INIT=${CONFLUENCE_POSTGRES_INIT}
- POSTGRES_CONFLUENCE_DB=${CONFLUENCE_POSTGRES_DB}
- POSTGRES_CONFLUENCE_USER=${CONFLUENCE_POSTGRES_USER}
- POSTGRES_CONFLUENCE_PASSWORD=${CONFLUENCE_POSTGRES_PASSWORD}
networks: networks:
- backend - backend
@ -1481,3 +1487,17 @@ services:
networks: networks:
- backend - backend
- frontend - frontend
### CONFLUENCE ################################################
confluence:
container_name: Confluence
image: atlassian/confluence-server:${CONFLUENCE_VERSION}
restart: always
ports:
- "${CONFLUENCE_HOST_HTTP_PORT}:8090"
networks:
- frontend
- backend
depends_on:
- postgres
volumes:
- ${DATA_PATH_HOST}/Confluence:/var/atlassian/application-data

View File

@ -375,6 +375,14 @@ JENKINS_HOST_HTTP_PORT=8090
JENKINS_HOST_SLAVE_AGENT_PORT=50000 JENKINS_HOST_SLAVE_AGENT_PORT=50000
JENKINS_HOME=./jenkins/jenkins_home JENKINS_HOME=./jenkins/jenkins_home
### CONFLUENCE ###############################################
CONFLUENCE_POSTGRES_INIT=true
CONFLUENCE_VERSION=6.13-ubuntu-18.04-adoptopenjdk8
CONFLUENCE_POSTGRES_DB=laradock_confluence
CONFLUENCE_POSTGRES_USER=laradock_confluence
CONFLUENCE_POSTGRES_PASSWORD=laradock_confluence
CONFLUENCE_HOST_HTTP_PORT=8090
### GRAFANA ############################################### ### GRAFANA ###############################################
GRAFANA_PORT=3000 GRAFANA_PORT=3000

View File

@ -2,3 +2,4 @@
!init_gitlab_db.sh !init_gitlab_db.sh
!init_jupyterhub_db.sh !init_jupyterhub_db.sh
!init_sonarqube_db.sh !init_sonarqube_db.sh
!init_confluence_db.sh

View File

@ -0,0 +1,44 @@
#!/bin/bash
#
# Copy createdb.sh.example to createdb.sh
# then uncomment then set database name and username to create you need databases
#
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER myuser WITH PASSWORD 'mypassword';
# CREATE DATABASE myshop_db;
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
# EOSQL
#
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
#
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db1 WITH PASSWORD 'db1';
# CREATE DATABASE db1;
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db2 WITH PASSWORD 'db2';
# CREATE DATABASE db2;
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db3 WITH PASSWORD 'db3';
# CREATE DATABASE db3;
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
# EOSQL
#
### default database and user for confluence ##############################################
if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER $POSTGRES_CONFLUENCE_USER WITH PASSWORD '$POSTGRES_CONFLUENCE_PASSWORD';
CREATE DATABASE $POSTGRES_CONFLUENCE_DB;
GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_CONFLUENCE_DB TO $POSTGRES_CONFLUENCE_USER;
ALTER ROLE $POSTGRES_CONFLUENCE_USER CREATEROLE SUPERUSER;
EOSQL
echo
fi