Added samples and CI
continuous-integration/drone Build is failing
Details
continuous-integration/drone Build is failing
Details
This commit is contained in:
parent
e2f92b8d72
commit
d01fd99d6f
|
@ -0,0 +1,24 @@
|
|||
kind: pipeline
|
||||
name: Build image
|
||||
image_pull_secrets:
|
||||
- dockerconfig
|
||||
steps:
|
||||
- name: Build docker image
|
||||
image: mxfox.ru/mxfox/docker-dind.buildx:latest
|
||||
privileged: true
|
||||
environment:
|
||||
DOCKER_AUTH:
|
||||
from_secret: dockerconfig
|
||||
IMAGE_PREFIX: mxfox.ru/mxfox/rabbitmq
|
||||
|
||||
commands:
|
||||
- buildx-bgstart.sh
|
||||
- echo $${DOCKER_AUTH} > ~/.docker/config.json
|
||||
- |
|
||||
if [ -n "${DRONE_TAG}" ]
|
||||
then
|
||||
export xBuildSuffix=" -t $${IMAGE_PREFIX}:${DRONE_TAG} -t $${IMAGE_PREFIX}:latest --push"
|
||||
else
|
||||
export xBuildSuffix=" -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10} -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH} --push"
|
||||
fi
|
||||
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm . $${xBuildSuffix}
|
|
@ -0,0 +1,26 @@
|
|||
version: "2"
|
||||
|
||||
services:
|
||||
|
||||
rabbitmq:
|
||||
image: "mxfox.ru/mxfox/rabbitmq:main"
|
||||
networks:
|
||||
- interlink
|
||||
volumes:
|
||||
- ./rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config
|
||||
|
||||
ports:
|
||||
- "5672:5672"
|
||||
- "15672:15672"
|
||||
environment:
|
||||
- RABBITMQ_DEFAULT_USER=${RABBITMQ_ADMIN_USER:-guest}
|
||||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_ADMIN_PASS:-guest}
|
||||
|
||||
rabbitmq-tcprelay:
|
||||
restart: "on-failure"
|
||||
image: "cloudamqp/websocket-tcp-relay"
|
||||
networks:
|
||||
- interlink
|
||||
command: "--upstream tcp://rabbitmq:5672"
|
||||
ports:
|
||||
- "15670:15670"
|
|
@ -0,0 +1,31 @@
|
|||
[
|
||||
%% Enable rabbit_auth_backend_oauth2
|
||||
{rabbit, [
|
||||
{auth_backends, [rabbit_auth_backend_oauth2, rabbit_auth_backend_internal]}
|
||||
]},
|
||||
|
||||
{rabbitmq_management, [
|
||||
{enable_uaa, true},
|
||||
{uaa_client_id, "rabbit_user_client"},
|
||||
{uaa_location, "http://localhost:8080/uaa"}
|
||||
]},
|
||||
|
||||
%% Set a resource server ID. Will require all scopes to be prefixed with `rabbitmq.`
|
||||
{rabbitmq_auth_backend_oauth2, [
|
||||
{resource_server_id, <<"rabbitmq">>},
|
||||
% Set up a legacy signing key
|
||||
{key_config, [
|
||||
{default_key, <<"legacy-token-key">>},
|
||||
{signing_keys, #{
|
||||
<<"legacy-token-key">> =>
|
||||
{map, #{
|
||||
<<"alg">> => <<"HS256">>,
|
||||
<<"value">> => <<"rabbit_signing_key">>,
|
||||
<<"kty">> => <<"MAC">>,
|
||||
<<"use">> => <<"sig">>}
|
||||
}
|
||||
}
|
||||
} %% signing keys
|
||||
]} % key_config
|
||||
]} % rabbitmq_auth_backend_oauth2
|
||||
].
|
Loading…
Reference in New Issue