Skip to content

Commit

Permalink
Add local dev environment (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
janvhs committed Sep 20, 2024
1 parent 3df1832 commit e3dd04c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,20 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create checks tarball
run: |
mkdir checks.dist
cp -r bin checks.dist
cp -r checks checks.dist
mv checks checks.orig
mv checks.dist checks
tar -czf checks.tar.gz checks
mv checks.orig checks
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: packaging/suse/container/Dockerfile
push: true # Will only build if this is not here
tags: |
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
45 changes: 45 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "3.7"

services:

wanda:
image: ghcr.io/trento-project/trento-wanda:rolling
environment:
DATABASE_URL: ecto://postgres:postgres@postgres/postgres
SECRET_KEY_BASE: dummyS3cr3t
AMQP_URL: amqp://wanda:wanda@rabbitmq
CORS_ENABLED: "false"
CATALOG_PATH: /app/catalog
JWT_AUTHENTICATION_ENABLED: "false"
depends_on:
- postgres
- rabbitmq
ports:
- 4000:4000
entrypoint: /bin/sh -c "/app/bin/wanda eval \"Wanda.Release.init()\" && /app/bin/wanda start"
volumes:
- ./checks:/usr/share/trento/checks:ro

rabbitmq:
image: rabbitmq:3.10.5-management-alpine
ports:
- 5672:5672
- 15672:15672
environment:
RABBITMQ_DEFAULT_USER: wanda
RABBITMQ_DEFAULT_PASS: wanda

postgres:
image: postgres:15
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- 5434:5432
volumes:
- pg_data:/var/lib/postgresql/data

volumes:
pg_data:

4 changes: 2 additions & 2 deletions packaging/suse/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#!BuildTag: trento/trento-checks:%%VERSION%%-build%RELEASE%
#!UseOBSRepositories
#!ExclusiveArch: x86_64
FROM bci/bci-base:15.4
FROM registry.suse.com/bci/bci-base:15.4

LABEL org.opencontainers.image.source="https://github.com/trento-project/checks"

# If set to C, LC_ALL takes precedence
ENV LC_ALL C.UTF-8
ENV LC_ALL=C.UTF-8

# tar is required by kubectl cp
RUN zypper --non-interactive in -y tar && \
Expand Down

0 comments on commit e3dd04c

Please sign in to comment.