feature/ci (#84)
Co-authored-by: openhands <openhands@all-hands.dev> Reviewed-on: https://codeberg.org/johba/harb/pulls/84
This commit is contained in:
parent
beefe22f90
commit
4277f19b68
41 changed files with 3149 additions and 298 deletions
50
docker/Dockerfile.integration
Normal file
50
docker/Dockerfile.integration
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# syntax=docker/dockerfile:1.6
|
||||
# Composite integration image that bundles the entire Harb stack for E2E testing
|
||||
# This image runs docker-compose internally to orchestrate all services
|
||||
|
||||
FROM docker:27-dind
|
||||
|
||||
LABEL org.opencontainers.image.source="https://codeberg.org/johba/harb-ci"
|
||||
LABEL org.opencontainers.image.description="Harb Stack integration container for E2E CI tests"
|
||||
|
||||
ENV DOCKER_TLS_CERTDIR="" \
|
||||
COMPOSE_PROJECT_NAME=harb-ci \
|
||||
HARB_ENV=BASE_SEPOLIA_LOCAL_FORK \
|
||||
SKIP_WATCH=1
|
||||
|
||||
# Install docker-compose, bash, curl, and other essentials
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
git \
|
||||
docker-cli-compose \
|
||||
shadow \
|
||||
su-exec
|
||||
|
||||
# Create a non-root user for running the stack
|
||||
RUN addgroup -g 1000 harb && \
|
||||
adduser -D -u 1000 -G harb harb
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the entire project (will be mounted at runtime in CI, but needed for standalone usage)
|
||||
COPY --chown=harb:harb . /workspace/
|
||||
|
||||
# Pre-build kraiken-lib to speed up startup
|
||||
RUN cd /workspace && \
|
||||
if [ -f scripts/build-kraiken-lib.sh ]; then \
|
||||
./scripts/build-kraiken-lib.sh || echo "kraiken-lib build skipped"; \
|
||||
fi
|
||||
|
||||
# Healthcheck: verify the stack is responding via Caddy
|
||||
HEALTHCHECK --interval=5s --timeout=3s --retries=30 --start-period=120s \
|
||||
CMD curl -f http://localhost:8081/api/graphql || exit 1
|
||||
|
||||
# Entrypoint script to start Docker daemon and the stack
|
||||
COPY docker/integration-entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["bash"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue