Skip to content

Commit 77bb020

Browse files
committed
added support for APS 2.1
1 parent de820e2 commit 77bb020

File tree

9 files changed

+102
-58
lines changed

9 files changed

+102
-58
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.project
2+
.classpath
3+
.settings/

Dockerfile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
FROM alfresco/process-services:2.1.0
1+
FROM tomcat:9.0.56-jdk11-openjdk
22

33
ARG TOMCAT_DIR=/usr/local/tomcat
4+
ARG USERNAME=alfresco
5+
ARG USERID=33007
46

57
USER root
68

7-
#Uncomment the following lines for deploying extensions
8-
#RUN rm -rf $TOMCAT_DIR/webapps/activiti-app
9-
#COPY extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/webapps/activiti-app/WEB-INF/lib
10-
#COPY extensions/activiti-app.war $TOMCAT_DIR/webapps
9+
RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"
1110

12-
COPY logging/logback.xml $TOMCAT_DIR/lib
11+
RUN rm -rf $TOMCAT_DIR/webapps/activiti-app
1312

14-
COPY properties/activiti-app.properties $TOMCAT_DIR/lib
15-
COPY properties/activiti-ldap.properties $TOMCAT_DIR/lib
13+
#Uncomment below if you need to deploy an APS Extensions JAR
14+
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
1615

17-
COPY activiti-license/*.* $TOMCAT_DIR/lib/
16+
COPY --chown=${USERNAME} jdbc-driver/*.* $TOMCAT_DIR/lib
17+
COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib
18+
COPY --chown=${USERNAME} properties/activiti-app.properties $TOMCAT_DIR/lib
19+
COPY --chown=${USERNAME} properties/activiti-ldap.properties $TOMCAT_DIR/lib
20+
COPY --chown=${USERNAME} extensions/activiti-app.war $TOMCAT_DIR/webapps
21+
COPY --chown=${USERNAME} activiti-license/*.* $TOMCAT_DIR/lib/
22+
23+
RUN chown ${USERNAME}:${USERNAME} -R ${TOMCAT_DIR}
24+
25+
USER ${USERNAME}

Dockerfile-admin

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
FROM alfresco/process-services-admin:2.1.0
1+
FROM tomcat:9.0.56-jdk11-openjdk-slim
22

33
ARG TOMCAT_DIR=/usr/local/tomcat
4+
ARG USERNAME=alfresco
5+
ARG USERID=33007
46

57
USER root
68

7-
COPY properties/activiti-admin.properties $TOMCAT_DIR/lib
8-
COPY admin/tomcat/conf/server.xml $TOMCAT_DIR/conf
9+
RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"
10+
11+
COPY --chown=${USERNAME} jdbc-driver/*.* $TOMCAT_DIR/lib
12+
COPY --chown=${USERNAME} extensions/activiti-admin.war $TOMCAT_DIR/webapps
13+
COPY --chown=${USERNAME} properties/activiti-admin.properties $TOMCAT_DIR/lib
14+
COPY --chown=${USERNAME} admin/tomcat/conf/server.xml $TOMCAT_DIR/conf
15+
16+
RUN chown ${USERNAME}:${USERNAME} -R ${TOMCAT_DIR}
17+
18+
USER ${USERNAME}

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
lucastancapiano@MacBook-Pro alfresco-process-services-docker-deployment % cat README.md
21
# Alfresco Process Services Docker Deployment
32
Docker Compose template for deploying the Alfresco Process Services Platform.
43

54
The goal of this project is to help system administrators to manage a APS infrastructure deployed with Docker where they also need to configure parameters or install extensions.
65
For developers interested to build extensions please see the [Alfresco Process Services SDK](https://github.com/OpenPj/alfresco-process-services-project-sdk).
76

8-
The architecture template will deploy for you the following components:
7+
The architecture template will help you deploying APS for you with the following tested components:
98

109
* activiti-app 2.1.0
1110
* activiti-admin 2.1.0
@@ -14,10 +13,10 @@ The architecture template will deploy for you the following components:
1413

1514
Each component will have its own Docker Volume for managing the storage:
1615

17-
* `aps-db-volume`: database storage for activiti-app
18-
* `aps-contentstore-volume`: contentstore for attachments
19-
* `aps-es-volume`: file storage for search indexes
20-
* `aps-admin-db-volume`: database storage for activiti-admin
16+
* `aps-db-sa-volume`: database storage for activiti-app
17+
* `aps-contentstore-sa-volume`: file storage for attachments
18+
* `aps-es-sa-volume`: file storage for search indexes
19+
* `aps-admin-db-sa-volume`: database storage for activiti-admin
2120

2221
The provided run script will create these volumes for you.
2322

@@ -40,7 +39,7 @@ Before using this project you have to configure the following components:
4039

4140
```
4241
$ docker -v
43-
Docker version 20.10.8, build afacb8b
42+
Docker version 20.10.12, build e91ed57
4443
```
4544

4645
3. Docker Compose is included as part of Windows and Mac Docker installers.
@@ -53,25 +52,28 @@ For Linux-based users, install both the component separately with the following:
5352

5453
```
5554
$ docker-compose -v
56-
docker-compose version 1.29.2, build 8a1c60f6
55+
docker-compose version 2.2.3
5756
```
5857

59-
### APS Valid License
58+
### APS WAR artifacts, extensions and licensing
6059

61-
Put your license in the activiti-license folder.
60+
1. Put your license in the `activiti-license` folder
61+
2. Put the JDBC driver used by APS in the `jdbc-driver` folder
62+
3. Put your activiti-app.war and activiti-admin.war in the `extensions` folder
6263

6364
## Configuration
6465

6566
The structure of the project allows you to configure and install extensions against the APS platform as the following:
6667

6768
* `admin/tomcat/conf`: put here all the Tomcat configuration files
69+
* `jdbc-driver`: put here the JDBC driver for Activiti App and Activiti Admin
6870
* `logging`: change your logging strategy here using logback.xml
6971
* `properties`: change here your activiti-app and activiti-admin properties
7072
* `activiti-license`: put here your valid APS license
7173
* `docker-compose.yml`: change here your deployment structure
7274
* `Dockerfile`: change here your container build for activiti-app
7375
* `Dockerfile-admin`: change here your continer build for activiti-admin
74-
* `extensions`: put here your extensions (JARs or activiti-app.war)
76+
* `extensions`: put here your Activiti App, Activiti Admin and extensions (activiti-app.war, activiti-admin.war, extensions JARs)
7577

7678
For more informations about how to build extensions please see [Alfresco Process Services SDK](https://github.com/OpenPj/alfresco-process-services-project-sdk).
7779

@@ -104,5 +106,4 @@ Return in tail with:
104106

105107
```
106108
./run.sh tail
107-
```
108-
lucastancapiano@MacBook-Pro alfresco-process-services-docker-deployment %
109+
```

docker-compose.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
1-
version: '3.8'
1+
version: '3.9'
22
services:
33
process:
44
build: .
5+
hostname: process
6+
container_name: aps_process
7+
networks:
8+
- aps-network
59
environment:
6-
JAVA_OPTS: " -Xms256m -Xmx1g"
10+
JAVA_OPTS: " -Xms256m -Xmx1g"
711
ports:
812
- 8080:8080
9-
links:
10-
- postgres:postgres
11-
- elasticsearch:elasticsearch
1213
depends_on:
1314
- postgres
1415
- elasticsearch
16+
- process-admin
1517
volumes:
16-
- aps-contentstore-volume:/act_data
18+
- aps-contentstore-sa-volume:/act_data
1719

1820
process-admin:
1921
build:
2022
context: .
2123
dockerfile: Dockerfile-admin
24+
hostname: process-admin
25+
container_name: aps_process_admin
26+
networks:
27+
- aps-network
2228
environment:
2329
JAVA_OPTS: " -Xms256m -Xmx512m"
2430
ports:
2531
- 9090:9090
26-
links:
27-
- postgres-admin:postgres-admin
28-
- process:process
2932
depends_on:
3033
- postgres-admin
3134

3235
elasticsearch:
36+
hostname: elasticsearch
37+
container_name: aps_elasticsearch
38+
networks:
39+
- aps-network
3340
image: elasticsearch:7.13.2
3441
environment:
3542
discovery.type: single-node
@@ -38,9 +45,13 @@ services:
3845
- 9300:9300
3946
- 9200:9200
4047
volumes:
41-
- aps-es-volume:/usr/share/elasticsearch/data
48+
- aps-es-sa-volume:/usr/share/elasticsearch/data
4249

4350
postgres:
51+
hostname: postgres
52+
container_name: aps_postgres
53+
networks:
54+
- aps-network
4455
image: postgres:13.1
4556
environment:
4657
POSTGRES_DB: activiti
@@ -49,9 +60,13 @@ services:
4960
ports:
5061
- 5432:5432
5162
volumes:
52-
- aps-db-volume:/var/lib/postgresql/data
63+
- aps-db-sa-volume:/var/lib/postgresql/data
5364

5465
postgres-admin:
66+
hostname: postgres-admin
67+
container_name: aps_postgres_admin
68+
networks:
69+
- aps-network
5570
image: postgres:13.1
5671
environment:
5772
POSTGRES_DB: activiti-admin
@@ -62,15 +77,19 @@ services:
6277
expose:
6378
- "5433"
6479
volumes:
65-
- aps-admin-db-volume:/var/lib/postgresql/data
80+
- aps-admin-db-sa-volume:/var/lib/postgresql/data
6681
command: -p 5433
6782

83+
networks:
84+
aps-network:
85+
name: aps-network
86+
6887
volumes:
69-
aps-db-volume:
88+
aps-db-sa-volume:
7089
external: true
71-
aps-admin-db-volume:
90+
aps-admin-db-sa-volume:
7291
external: true
73-
aps-contentstore-volume:
92+
aps-contentstore-sa-volume:
7493
external: true
75-
aps-es-volume:
94+
aps-es-sa-volume:
7695
external: true

extensions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Extensions
22

3-
Put here your APS extensions (activiti-extensions.jar or activiti-app.war)
3+
Put here your activiti-app and activiti-admin WARs and APS extensions (activiti-app.war, activiti-admin.war and activiti-extensions.jar)

jdbc-driver/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Extensions
2+
3+
Put here the JDBC driver used by Activiti App and Activiti Admin

run.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ echo "Usage: %0 {start|stop|purge|tail}"
2929
EXIT /B %ERRORLEVEL%
3030

3131
:start
32-
docker volume create aps-db-volume
33-
docker volume create aps-admin-db-volume
34-
docker volume create aps-contentstore-volume
35-
docker volume create aps-es-volume
32+
docker volume create aps-db-sa-volume
33+
docker volume create aps-admin-db-sa-volume
34+
docker volume create aps-contentstore-sa-volume
35+
docker volume create aps-es-sa-volume
3636
docker-compose up --build -d
3737
EXIT /B 0
3838
:down
@@ -45,8 +45,8 @@ EXIT /B 0
4545
docker-compose logs --tail="all"
4646
EXIT /B 0
4747
:purge
48-
docker volume rm aps-db-volume
49-
docker volume rm aps-admin-db-volume
50-
docker volume rm aps-contentstore-volume
51-
docker volume rm aps-es-volume
48+
docker volume rm aps-db-sa-volume
49+
docker volume rm aps-admin-db-sa-volume
50+
docker volume rm aps-contentstore-sa-volume
51+
docker volume rm aps-es-sa-volume
5252
EXIT /B 0

run.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh
22

33
start() {
4-
docker volume create aps-db-volume
5-
docker volume create aps-admin-db-volume
6-
docker volume create aps-contentstore-volume
7-
docker volume create aps-es-volume
4+
docker volume create aps-db-sa-volume
5+
docker volume create aps-admin-db-sa-volume
6+
docker volume create aps-contentstore-sa-volume
7+
docker volume create aps-es-sa-volume
88
docker-compose up --build -d
99
}
1010

@@ -13,10 +13,10 @@ down() {
1313
}
1414

1515
purge() {
16-
docker volume rm aps-db-volume
17-
docker volume rm aps-admin-db-volume
18-
docker volume rm aps-contentstore-volume
19-
docker volume rm aps-es-volume
16+
docker volume rm aps-db-sa-volume
17+
docker volume rm aps-admin-db-sa-volume
18+
docker volume rm aps-contentstore-sa-volume
19+
docker volume rm aps-es-sa-volume
2020
}
2121

2222
tail() {

0 commit comments

Comments
 (0)