Skip to content

Commit

Permalink
feat(devel): add new dev environment
Browse files Browse the repository at this point in the history
First track is done: Run Postgres, Keycloak and MIW as containers locally
  • Loading branch information
pmoscode committed Jun 30, 2023
1 parent eac3337 commit 6a37e10
Show file tree
Hide file tree
Showing 4 changed files with 2,626 additions and 0 deletions.
84 changes: 84 additions & 0 deletions dev-assets/docker-environment/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#
# /********************************************************************************
# Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
#

version: '3'

services:
miw:
image: local-miw:latest
container_name: miw
env_file:
- ../../local.env
ports:
- "8000:8000"
- "8090:8090"
networks:
- miw-net

postgres:
image: postgres:15.3-alpine3.18
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres/db.sh:/docker-entrypoint-initdb.d/init-database.sh
env_file:
- ../../local.env
#environment:
# POSTGRES_DB: keycloak
# POSTGRES_USER: keycloak
# POSTGRES_PASSWORD: password
ports:
- "5432:5432"
networks:
- miw-net

keycloak:
image: quay.io/keycloak/keycloak:21.1
env_file:
- ../../local.env
environment:
DB_SCHEMA: public
KC_HOSTNAME: keycloak
# DB_VENDOR: POSTGRES
# DB_ADDR: postgres
# DB_DATABASE: keycloak
# DB_USER: keycloak
# DB_PASSWORD: password
# KEYCLOAK_ADMIN: admin
# KEYCLOAK_ADMIN_PASSWORD: admin
command:
- start-dev
- --import-realm
volumes:
- ./keycloak/miw_test_realm_docker.json:/opt/keycloak/data/import/miw_test_realm_docker.json
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- miw-net

volumes:
postgres_data:
driver: local

networks:
miw-net:
name: miw-net
Loading

0 comments on commit 6a37e10

Please sign in to comment.