Verified Commit 1623f828 authored by Hugo's avatar Hugo
Browse files

single docker file and dev ci

parent 1f47791a
Pipeline #748 passed with stages
in 1 minute and 39 seconds
......@@ -30,7 +30,18 @@ docker-build:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.build --destination $DOCKER_IMAGE:$CI_COMMIT_SHORT_SHA
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --destination $DOCKER_IMAGE:$CI_COMMIT_SHORT_SHA --destination $DOCKER_IMAGE:latest
only:
- master
- master
docker-build-dev:
stage: docker-build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --destination $DOCKER_IMAGE:$CI_COMMIT_REF_SLUG
except:
- master
FROM quay.io/keycloak/keycloak:15.0.2
FROM docker.io/jboss/keycloak:15.0.2 as base
RUN sed -i 's/ng-pattern=\".*\"/pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/user-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/group-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/create-group.html
FROM base as prod
COPY ./liiibre.jar /opt/jboss/keycloak/standalone/deployments/liiibre.jar
FROM docker.io/jboss/keycloak:15.0.2
RUN sed -i 's/ng-pattern=\".*\"/pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/user-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/group-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/create-group.html
COPY ./liiibre.jar /opt/jboss/keycloak/standalone/deployments/liiibre.jar
version: "3"
services:
keycloak:
image: libresh/keycloak:latest
build:
target: prod
volumes:
- ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli
version: '3'
version: "3"
services:
postgres:
image: postgres
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
build: ./
image: libresh/keycloak:dev
build:
context: ./
target: base
volumes:
- ./src/cfamederic:/opt/jboss/keycloak/themes/cfamederic
- ./src/liiibre:/opt/jboss/keycloak/themes/liiibre
......@@ -30,7 +33,7 @@ services:
ports:
- 8080:8080
depends_on:
- postgres
- postgres
volumes:
db:
version: '3'
services:
postgres:
image: postgres
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: keycloak
volumes:
- ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: indiehosters
ports:
- 8080:8080
depends_on:
- postgres
volumes:
db:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment