Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

score-compose init|generate #116

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
SCORE_COMPOSE_VERSION: 'latest'
SCORE_HELM_VERSION: 'latest'
WORKLOAD_NAME: my-sample-app
CONTAINER_NAME: my-sample-app
HUMCTL_VERSION: '0.19.1'
jobs:
build-run-test-push:
Expand All @@ -36,30 +37,23 @@ jobs:
file: score-compose
token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.SCORE_COMPOSE_VERSION }}
- name: generate docker compose files
- name: score-compose generate
run: |
docker build -t ${{ env.IMAGE_NAME }}:${{ env.ENVIRONMENT_ID }} app/
score-compose run \
--build app/ \
-f score/score.yaml \
-o compose.yaml
score-compose init
score-compose generate score/score.yaml \
--build=${{ env.CONTAINER_NAME }}=app/

cat <<EOF > compose.override.yaml
services:
${{ env.WORKLOAD_NAME }}:
image: ${{ env.IMAGE_NAME }}:${{ env.ENVIRONMENT_ID }}
${{ env.WORKLOAD_NAME }}-${{ env.CONTAINER_NAME }}:
read_only: true
cap_drop:
- ALL
user: "1000"
EOF
- name: build & run container
run: |
docker compose \
up \
--build \
-d \
--wait \
--wait-timeout 30
docker compose up --build -d --wait --wait-timeout 30
- name: test container
run: |
sleep 10
Expand Down
Loading