-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2868 Add acc app Dockerfile (#59)
Co-authored-by: Giovanni Toraldo <[email protected]>
- Loading branch information
Showing
11 changed files
with
298 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM busybox AS unpack | ||
WORKDIR /unpack | ||
COPY ./*zip / | ||
RUN unzip /*zip && rm /*zip | ||
|
||
FROM nginxinc/nginx-unprivileged:alpine3.20 | ||
|
||
ARG CONFIG_PATH=/etc/nginx/conf.d | ||
|
||
USER root | ||
RUN apk update && apk upgrade | ||
COPY default.conf.template /etc/nginx/templates/ | ||
|
||
COPY --from=unpack /unpack/ /usr/share/nginx/html/ | ||
|
||
RUN chown -R 101:101 ${CONFIG_PATH} | ||
|
||
USER 101 | ||
|
||
# Nginx default settings | ||
# ------------------------------- | ||
ENV SERVER_PORT=8080 | ||
ENV BASE_PATH=/ | ||
ENV NGINX_ENVSUBST_OUTPUT_DIR=${CONFIG_PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Alfresco control center image | ||
|
||
## Description | ||
|
||
This Docker file is used to build an Alfresco control center. | ||
|
||
## Building the image | ||
|
||
Make sure all required artifacts are present in the build context `adf-apps/acc/`. | ||
You can put them manually in the `adf-apps/acc/` folder (for example if that's a | ||
custom module of yours), or use the script `./scripts/fetch-artifacts.sh` to | ||
download them from Alfresco's Nexus. | ||
|
||
Then, you can build the image from the root of this git repository with the | ||
following command: | ||
|
||
```bash | ||
docker buildx bake acc | ||
``` | ||
|
||
## Running the image | ||
|
||
:warning: `BASE_PATH` should still be provided as a env or directly changed | ||
inside `default.conf.template` | ||
|
||
To run the image it is recommended to review and provide the json config file. | ||
Example configuration of that file is stored on this repository: `test/configs/acc.json`. | ||
|
||
:warning: It is recommended to get your own config file because it may differ | ||
from the one stored on this repo. To get the config file either extract it from | ||
the artifact zip or copy it from the running image with: | ||
|
||
```sh | ||
docker run --name temp-container -d localhost/alfresco/alfresco-control-center:latest && \ | ||
docker cp temp-container:/usr/share/nginx/html/app.config.json ./acc.config.json && \ | ||
docker stop temp-container && \ | ||
docker rm temp-container | ||
``` | ||
|
||
There is few approaches you can use to provide a config | ||
file e.g. | ||
|
||
### Providing app.config.json at run time using docker compose | ||
|
||
1. Point config file to specific path on container: | ||
|
||
```yaml | ||
volumes: | ||
- ./acc.config.json:/usr/share/nginx/html/app.config.json | ||
``` | ||
### Providing app.config.json at run time using helm | ||
1. Change the `acc.config.json` according to needs | ||
2. Create configmap from it, in the same namespace where acs is being deployed | ||
|
||
```sh | ||
kubectl create configmap acc-config --from-file=app.config.json=acc.config.json | ||
``` | ||
|
||
3. Mount created configmap to the acc deployment: | ||
|
||
```yaml | ||
alfresco-control-center: | ||
image: | ||
repository: localhost/alfresco/alfresco-control-center | ||
tag: latest | ||
env: | ||
BASE_PATH: / | ||
volumeMounts: | ||
- name: app-config | ||
mountPath: /usr/share/nginx/html/app.config.json | ||
subPath: app.config.json | ||
volumes: | ||
- name: app-config | ||
configMap: | ||
name: acc-config | ||
items: | ||
- key: app.config.json | ||
path: app.config.json | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"artifacts": { | ||
"acs23": [ | ||
{ | ||
"name": "alfresco-control-center", | ||
"version": "9.1.0", | ||
"path": "adf-apps/acc", | ||
"classifier": ".zip", | ||
"group": "org.alfresco", | ||
"repository": "releases" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
server { | ||
listen ${SERVER_PORT}; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
rewrite ^([^.]*[^/])$ $1/ permanent; | ||
absolute_redirect off; | ||
|
||
location ${BASE_PATH} { | ||
set $EVAL_BASE_PATH "${BASE_PATH}"; | ||
if ($EVAL_BASE_PATH = "/") { | ||
root /usr/share/nginx/html; | ||
} | ||
index index.html index.htm; | ||
alias /usr/share/nginx/html; | ||
} | ||
|
||
server_tokens off; | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"$schema": "../../../node_modules/@alfresco/adf-core/app.config.schema.json", | ||
"providers": "ECM", | ||
"ecmHost": "{protocol}//{hostname}{:port}", | ||
"bpmHost": "{protocol}//{hostname}{:port}", | ||
"authType": "BASIC", | ||
"identityHost": "{protocol}//{hostname}{:port}/auth/admin/realms/alfresco", | ||
"oauth2": { | ||
"host": "{protocol}//{hostname}{:port}/auth/realms/alfresco", | ||
"clientId": "alfresco", | ||
"scope": "openid profile email", | ||
"implicitFlow": true, | ||
"codeFlow": false, | ||
"silentLogin": true, | ||
"publicUrls": [], | ||
"redirectSilentIframeUri": "{protocol}//{hostname}{:port}/assets/silent-refresh.html", | ||
"redirectUri": "", | ||
"audience": "", | ||
"redirectUriLogout": "/", | ||
"skipIssuerCheck": true, | ||
"strictDiscoveryDocumentValidation": false | ||
}, | ||
"application": { | ||
"name": "Alfresco Admin App", | ||
"copyright": "© 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved." | ||
}, | ||
"plugins":{ | ||
"tagsEnabled": true, | ||
"categoriesEnabled": true | ||
}, | ||
"logLevel": "trace", | ||
"locale": "en", | ||
"pagination": { | ||
"size": 50, | ||
"supportedPageSizes": [25, 50, 100] | ||
}, | ||
"export": { | ||
"helm": true | ||
}, | ||
"alfresco-dependencies": [ | ||
"rb", | ||
"query" | ||
], | ||
"content-identity": { | ||
"presets": { | ||
"default": [ | ||
{ | ||
"key": "id", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_USERS.USER_LIST.PROPERTIES.ID", | ||
"sortable": true, | ||
"draggable": true | ||
}, | ||
{ | ||
"key": "firstName", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_USERS.USER_LIST.PROPERTIES.FIRST_NAME", | ||
"sortable": true, | ||
"draggable": true | ||
}, | ||
{ | ||
"key": "lastName", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_USERS.USER_LIST.PROPERTIES.LAST_NAME", | ||
"sortable": true, | ||
"draggable": true | ||
}, | ||
{ | ||
"key": "email", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_USERS.USER_LIST.PROPERTIES.EMAIL", | ||
"sortable": false, | ||
"draggable": true | ||
}, | ||
{ | ||
"key": "status", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_USERS.USER_LIST.PROPERTIES.STATUS", | ||
"sortable": false, | ||
"draggable": true | ||
} | ||
] | ||
}, | ||
"group-list-presets": { | ||
"default": [ | ||
{ | ||
"key": "displayName", | ||
"type": "text", | ||
"title": "CONTENT_IDENTITY_GROUPS.GROUP_LIST.PROPERTIES.DISPLAY_NAME", | ||
"sortable": false | ||
} | ||
] | ||
} | ||
}, | ||
"security-controls": { | ||
"presets": { | ||
"default": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters