-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9cd651
commit e303e10
Showing
33 changed files
with
1,353 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Authenticate to AWS ECR | ||
description: Encapsulates steps for Authenticating to ECR | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
inputs: | ||
AWS_REGION: | ||
description: 'AWS Region' | ||
required: true | ||
AWS_ARN_ROLE_TO_ASSUME: | ||
description: 'AWS role ARN' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v3.0.1 | ||
with: | ||
role-to-assume: ${{ inputs.AWS_ARN_ROLE_TO_ASSUME }} | ||
aws-region: ${{ inputs.AWS_REGION }} | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
with: | ||
mask-password: "true" | ||
|
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,39 @@ | ||
name: Debug custom actions integration test containers | ||
description: Encapsulates steps for custom actions test debugging | ||
|
||
inputs: | ||
COMPOSE_FILE_PATH: | ||
description: 'Custom action docker compose path' | ||
required: true | ||
RASA_SDK_REPOSITORY: | ||
description: 'Rasa SDK repository path' | ||
required: true | ||
RASA_SDK_IMAGE_TAG: | ||
description: 'Rasa SDK image tag' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: List containers | ||
run: sudo docker ps -a | ||
shell: bash | ||
|
||
- name: Check logs for action server without TLS | ||
env: | ||
RASA_SDK_REPOSITORY: ${{ inputs.RASA_SDK_REPOSITORY }} | ||
RASA_SDK_IMAGE_TAG: ${{ inputs.RASA_SDK_IMAGE_TAG }} | ||
run: | | ||
docker compose -f ${{ inputs.COMPOSE_FILE_PATH }} \ | ||
logs action-server-grpc-no-tls | ||
shell: bash | ||
|
||
- name: Check logs for action server with TLS | ||
env: | ||
RASA_SDK_REPOSITORY: ${{ inputs.RASA_SDK_REPOSITORY }} | ||
RASA_SDK_IMAGE_TAG: ${{ inputs.RASA_SDK_IMAGE_TAG }} | ||
run: | | ||
docker compose -f ${{ inputs.COMPOSE_FILE_PATH }} \ | ||
logs action-server-grpc-tls | ||
shell: bash |
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,81 @@ | ||
FROM ubuntu:22.04 AS base | ||
|
||
# hadolint ignore=DL3005,DL3008 | ||
RUN apt-get update -qq \ | ||
# Make sure that all security updates are installed | ||
&& apt-get dist-upgrade -y --no-install-recommends \ | ||
&& apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-venv \ | ||
python3-pip \ | ||
python3-dev \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100 \ | ||
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 100 | ||
|
||
FROM base AS python_builder | ||
|
||
ARG POETRY_VERSION=1.8.2 | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update -qq \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
&& apt-get autoremove -y | ||
|
||
# install poetry | ||
# keep this in sync with the version in pyproject.toml and Dockerfile | ||
ENV POETRY_VERSION=$POETRY_VERSION | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN curl -sSL https://install.python-poetry.org | python | ||
ENV PATH="/root/.local/bin:/opt/venv/bin:${PATH}" | ||
|
||
# install dependencies | ||
COPY . /app/ | ||
|
||
WORKDIR /app | ||
|
||
# hadolint ignore=SC1091,DL3013 | ||
# install dependencies and build wheels | ||
RUN python -m venv /opt/venv && \ | ||
. /opt/venv/bin/activate && \ | ||
pip install --no-cache-dir -U pip && \ | ||
pip install --no-cache-dir wheel && \ | ||
poetry install --no-root --no-interaction | ||
|
||
# build the Rasa SDK wheel and install it | ||
# hadolint ignore=SC1091,DL3013 | ||
RUN poetry build -f wheel -n && \ | ||
pip install --no-deps dist/*.whl && \ | ||
rm -rf dist *.egg-info | ||
|
||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | ||
&& rm -rf /root/.cache/pip/* | ||
|
||
EXPOSE 5055 | ||
ENTRYPOINT [""] | ||
#CMD [""] | ||
## final image | ||
#FROM base | ||
# | ||
## copy needed files | ||
#COPY ./entrypoint.sh /app/ | ||
#COPY --from=python_builder /opt/venv /opt/venv | ||
# | ||
#ENV PATH="/opt/venv/bin:$PATH" | ||
# | ||
## update permissions & change user | ||
#RUN chgrp -R 0 /app && chmod -R g=u /app | ||
#USER 1001 | ||
# | ||
## change shell | ||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
# | ||
## create a mount point for custom actions and the entry point | ||
#WORKDIR /app | ||
#EXPOSE 5055 | ||
#ENTRYPOINT [""] | ||
#CMD [""] |
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,9 @@ | ||
ca-key.pem | ||
ca.csr | ||
ca.pem | ||
client-key.pem | ||
client.csr | ||
client.pem | ||
server-key.pem | ||
server.csr | ||
server.pem |
Oops, something went wrong.