Skip to content

Commit

Permalink
Update docker compose and github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Dec 16, 2024
1 parent f7e88f5 commit c0219b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tang-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
branches:
- main
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"
jobs:
golangci:
name: Lint
Expand Down Expand Up @@ -44,15 +44,15 @@ jobs:
with:
go-version: "1.23"
- name: start pulp
uses: isbang/compose-action@v2.0.1
uses: isbang/compose-action@v2.0.2
with:
compose-file: docker-compose.yml
cwd: ./compose_files/pulp/
down-flags: --volumes
- name: Wait for pulp
run: |
docker run --network=host --rm -v ${PWD}:/local curlimages/curl \
curl --retry-all-errors --fail --retry-delay 10 --retry 32 --retry-max-time 240 http://localhost:8087/api/pulp/default/api/v3/repositories/rpm/rpm/ -u admin:password
curl --retry-all-errors --fail --retry-delay 10 --retry 32 --retry-max-time 240 http://localhost:8080/api/pulp/default/api/v3/repositories/rpm/rpm/ -u admin:password
sleep 30
- name: integration tests
run: |
Expand All @@ -63,6 +63,6 @@ jobs:
DATABASE_USER: pulp
DATABASE_NAME: pulp
DATABASE_PASSWORD: password
SERVER_URL: http://localhost:8087
SERVER_URL: http://localhost:8080
SERVER_USERNAME: admin
SERVER_PASSWORD: password
SERVER_PASSWORD: password
50 changes: 25 additions & 25 deletions compose_files/pulp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
version: '3'
services:
postgres:
image: "docker.io/library/postgres:13"
image: "docker.io/library/postgres:16"
ports:
- "5434:5432"
environment:
POSTGRES_USER: pulp
POSTGRES_PASSWORD: password
POSTGRES_DB: pulp
POSTGRES_INITDB_ARGS: '--auth-host=scram-sha-256'
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256'
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
POSTGRES_HOST_AUTH_METHOD: "scram-sha-256"
volumes:
- "pg_data:/var/lib/postgresql"
- "./assets/postgres/passwd:/etc/passwd:Z"
Expand All @@ -22,6 +21,7 @@ services:

migration_service:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
depends_on:
postgres:
condition: service_healthy
Expand All @@ -30,10 +30,11 @@ services:
volumes:
- "./assets/settings.py:/etc/pulp/settings.py:z"
- "./assets/certs:/etc/pulp/certs:z"
- "pulp:/var/lib/pulp"
- "pulp:/var/lib/pulp"

set_init_password_service:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
command: set_init_password.sh
depends_on:
migration_service:
Expand All @@ -51,16 +52,19 @@ services:
- "redis_data:/data"
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]

pulp_api:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-api' ]
command: ["pulp-api"]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- 8080:24817
hostname: pulp-api
user: pulp
volumes:
Expand All @@ -73,16 +77,21 @@ services:
PULP_ADMIN_PASSWORD: password
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always

pulp_content:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-content' ]
command: ["pulp-content"]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- 8081:24816
hostname: pulp-content
user: pulp
volumes:
Expand All @@ -94,28 +103,16 @@ services:
POSTGRES_SERVICE_HOST: postgres
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
restart: always

pulp_web:
image: "pulp/pulp-web:latest"
command: [ '/usr/bin/nginx.sh' ]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- "8087:8080"
hostname: pulp
user: root
volumes:
- "./assets/bin/nginx.sh:/usr/bin/nginx.sh:Z"
- "./assets/nginx/nginx.conf.template:/etc/opt/rh/rh-nginx116/nginx/nginx.conf.template:Z"
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always

pulp_worker:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-worker' ]
command: ["pulp-worker"]
depends_on:
migration_service:
condition: service_completed_successfully
Expand All @@ -130,6 +127,9 @@ services:
POSTGRES_SERVICE_PORT: 5432
POSTGRES_SERVICE_HOST: postgres
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always
volumes:
pulp:
Expand Down

0 comments on commit c0219b8

Please sign in to comment.