mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 21:51:59 +01:00
More fixes for container start
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
c5b484f16a
commit
b496a65aae
@ -1,66 +0,0 @@
|
|||||||
##docker run --rm --name builder-piler-58-jammy --memory 1G --pids-limit 64 --network piler -e DISTRO=jammy -e COMMIT_HASH=crlf_fix2 -e FORCE_BUILD=false -e SECRETS_FILE=/data/secrets.inc -e PROJECT_ID=piler -e BUILD_NUMBER=58 -e JOB_NAME=piler -e DRY_RUN=false -e DEBUG=false -e S3_HOST=ibm -e WORKSPACE=/home/jenkins/workspace/piler -e RT=0 -v /home/jenkins/data:/data -v /home/jenkins/config/config.json:/root/.mc/config.json:ro -v /home/jenkins/config/piler.pem:/etc/piler/piler.pem:ro -v /home/jenkins/config/piler.conf:/etc/piler/piler.conf:ro -v /home/jenkins/config/jenkins.key:/root/.ssh/jenkins.key:ro -v /home/jenkins/license:/license -v /usr/local/bin/mc:/usr/local/bin/mc:ro sutoj/builder:jammy
|
|
||||||
|
|
||||||
version: '3.4'
|
|
||||||
services:
|
|
||||||
syslog:
|
|
||||||
image: sutoj/syslog
|
|
||||||
container_name: syslog.host
|
|
||||||
networks:
|
|
||||||
- piler
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 512M
|
|
||||||
|
|
||||||
piler:
|
|
||||||
image: sutoj/piler:jammy
|
|
||||||
container_name: piler1
|
|
||||||
networks:
|
|
||||||
- piler
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 512M
|
|
||||||
env_file:
|
|
||||||
- ./.env
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:80:80"
|
|
||||||
- "25:25"
|
|
||||||
volumes:
|
|
||||||
- /home/jenkins/data:/data:ro
|
|
||||||
- /home/jenkins/config/11-aaaa.conf:/etc/rsyslog.d/11-aaaa.conf:ro
|
|
||||||
- ./setup.sql:/tmp/setup.sql:ro
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-s", "smtp://localhost"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 3
|
|
||||||
start_period: 10s
|
|
||||||
depends_on:
|
|
||||||
- smarthost.aaa.fu
|
|
||||||
- syslog
|
|
||||||
- imap.aaa.fu
|
|
||||||
|
|
||||||
smarthost.aaa.fu:
|
|
||||||
image: sutoj/smtps-source
|
|
||||||
container_name: smarthost.aaa.fu
|
|
||||||
networks:
|
|
||||||
- piler
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 64M
|
|
||||||
command: smtp-sink -h smarthost.aaa.fu -u nobody :25 10
|
|
||||||
|
|
||||||
imap.aaa.fu:
|
|
||||||
image: sutoj/imap
|
|
||||||
container_name: imap.aaa.fu
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 64M
|
|
||||||
networks:
|
|
||||||
- piler
|
|
||||||
|
|
||||||
networks:
|
|
||||||
piler:
|
|
@ -18,25 +18,23 @@ cleanup_package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
launch_containers() {
|
launch_containers() {
|
||||||
|
local composefile="docker-compose-piler.yaml"
|
||||||
|
|
||||||
log "${FUNCNAME[0]}"
|
log "${FUNCNAME[0]}"
|
||||||
|
|
||||||
pushd "${WORKSPACE}/ci/test/docker-compose"
|
pushd "${WORKSPACE}/ci/test/docker-compose"
|
||||||
|
|
||||||
CONTAINERS+=( "piler1" "syslog.host" )
|
|
||||||
|
|
||||||
echo -e "PACKAGE=$PACKAGE\nPILER_HOST=cust1.acts.hu\nRT=$RT" > .env
|
echo -e "PACKAGE=$PACKAGE\nPILER_HOST=cust1.acts.hu\nRT=$RT" > .env
|
||||||
|
|
||||||
log "running docker-compose down"
|
destroy_containers
|
||||||
|
|
||||||
docker-compose down -v || true
|
|
||||||
|
|
||||||
log "running docker-compose up"
|
log "running docker-compose up"
|
||||||
|
|
||||||
docker-compose up -d
|
docker-compose -f "$composefile" up -d
|
||||||
|
|
||||||
wait_until_container_is_healthy "piler1"
|
wait_until_container_is_healthy "piler1"
|
||||||
|
|
||||||
docker-compose ps
|
docker-compose -f "$composefile" ps
|
||||||
|
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user