-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* move ADF linking to the dev docs * add basic Docker docs * reduce docker params * update docker docs
- Loading branch information
1 parent
7ab4cc5
commit b192c5f
Showing
11 changed files
with
101 additions
and
77 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
eval ALL_ARGUMENTS=("BASE_PATH" | ||
) | ||
ALL_ARGUMENTS_LENGTH=${#ALL_ARGUMENTS[@]} | ||
DOCKER_ARGS="" | ||
for (( j=0; j<${ALL_ARGUMENTS_LENGTH}; j++ )); do | ||
ARG="${ALL_ARGUMENTS[$j]}" | ||
if [ -v "${ARG}" ]; then | ||
DOCKER_ARGS="$DOCKER_ARGS --env $ARG=${!ARG}" | ||
fi | ||
done | ||
|
||
DOCKER_IMAGE_REPO=alfresco/alfresco-content-app | ||
HOST_PORT=8081 | ||
CONTAINER_PORT=8080 | ||
|
||
docker rmi -f $DOCKER_IMAGE_REPO | ||
docker build --build-arg PROJECT_NAME=$PROJECT_NAME -t $DOCKER_IMAGE_REPO . | ||
echo "http://localhost:${HOST_PORT}${BASE_PATH}" | ||
docker run --rm -it $DOCKER_ARGS --user 1000:1000 --publish $HOST_PORT:$CONTAINER_PORT $DOCKER_IMAGE_REPO | ||
docker build -t $DOCKER_IMAGE_REPO . | ||
|
||
echo "http://localhost:${HOST_PORT}" | ||
docker run --rm -it --user 1000:1000 --publish $HOST_PORT:$CONTAINER_PORT $DOCKER_IMAGE_REPO |
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,48 @@ | ||
# Docker Support | ||
|
||
Running local build with Docker | ||
|
||
```shell | ||
npm run build | ||
``` | ||
|
||
The application is already preconfigured to run alongside backend containers within the Docker Compose. | ||
|
||
If you need to provide custom settings, update `dist/content-ce/app.config.json` file. | ||
See [Configuration](/configuration/) section for more details | ||
|
||
Build and run the container: | ||
|
||
```shell | ||
./docker/run.sh | ||
``` | ||
|
||
The application is configured to run at `http://localhost:8081`. | ||
|
||
## Containerized Deployment | ||
|
||
Typically, you do not need changing application configuration when running ACA in the containerized deployment scenario. | ||
All defaults are already preconfigured and pointing to the locally running Nginx proxy. | ||
|
||
Please refer to [ACS Deployment](https://github.com/Alfresco/acs-deployment) | ||
and [ACS Docker Compose](https://github.com/Alfresco/acs-deployment/tree/master/docs/docker-compose) for more details. | ||
|
||
## Building manually | ||
|
||
Update `dist/content-ce/app.config.json` if needed. | ||
|
||
```shell | ||
# cleanup previous | ||
docker rmi -f alfresco/alfresco-content-app | ||
|
||
# build | ||
docker build -t alfresco/alfresco-content-app . | ||
``` | ||
|
||
You can now run this locally: | ||
|
||
```shell | ||
docker run --rm -it --user 1000:1000 --publish 8081:8080 alfresco/alfresco-content-app | ||
``` | ||
|
||
Navigate to `http://localhost:8081`. |
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,40 @@ | ||
# Using Local ADF | ||
|
||
If you are working with ADF source code and want to use the modified version with the ACA. | ||
|
||
Clone the `alfresco-ng2-components` and `alfresco-content-app` repositories in the same folder, and run the following command: | ||
|
||
```sh | ||
npm start -- --configuration=adf | ||
``` | ||
|
||
Changing the ADF code results in the recompilation and hot-reloading of the ACA application. | ||
|
||
## Triggering the build to use specific branch of ADF with CI flags | ||
|
||
You can create commits with the intention of running the build pipeline using a specific branch of ADF. To achieve this, you need to add a specific CI flag in your commit message: | ||
|
||
```text | ||
[link-adf:my-custom-branch-in-adf-repo] | ||
``` | ||
|
||
So for example a commit message can be like: | ||
|
||
```text | ||
[link-adf:my-custom-branch-in-adf-repo] Adding XYZ features for the navigation header | ||
``` | ||
|
||
When having this CI flag present in the commit message, the CI attempts to check out the given branch of ADF and use it when building / testing the applications. | ||
|
||
### Important things to consider | ||
|
||
- **This flag can only be used for PRs, not for any other type of builds** | ||
- At the end of a PR build, there is a check which will make the build fail if you used this CI flag. This is there to make sure, only those PRs can be merged, which are using already merged in ADF features, **since this flag's only purpose is to be able to test whether the applications could be built with an experimental ADF feature or not**. | ||
|
||
This step is rendered in the `Finalize` stage | ||
|
||
![travis stage](../images/link-adf-travis-stage.png) | ||
|
||
with an error message | ||
|
||
![travis stage](../images/link-adf-travis-console.png) |
File renamed without changes
File renamed without changes
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