67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: kg-nginx
|
|
volumes:
|
|
- ./nginx:/etc/nginx/conf.d
|
|
- ./frontend/dist:/usr/share/nginx/html
|
|
ports:
|
|
- ${PORT}:80
|
|
depends_on:
|
|
- backend
|
|
- keycloak
|
|
|
|
frontend:
|
|
container_name: kg-frontend
|
|
env_file:
|
|
- .env
|
|
build:
|
|
context: ./frontend
|
|
volumes:
|
|
- ./frontend/dist:/app/dist
|
|
develop:
|
|
watch:
|
|
- action: sync
|
|
path: ./frontend
|
|
target: /app
|
|
ignore:
|
|
- node_modules/
|
|
- dist/
|
|
- action: rebuild
|
|
path: ./frontend/package.json
|
|
|
|
backend:
|
|
container_name: kg-backend
|
|
build:
|
|
context: ./backend
|
|
depends_on:
|
|
- keycloak
|
|
|
|
keycloak:
|
|
container_name: kg-keycloak
|
|
image: quay.io/keycloak/keycloak:latest
|
|
environment:
|
|
- KC_DB=postgres
|
|
- KC_DB_URL=jdbc:postgresql://postgres:5432/keycloak
|
|
- KC_DB_USERNAME=${POSTGRES_USER}
|
|
- KC_DB_PASSWORD=${POSTGRES_PASSWORD}
|
|
- KEYCLOAK_ADMIN=${KEYCLOAK_USER}
|
|
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_PASSWORD}
|
|
- KEYCLOAK_FRONTEND_URL=${KEYCLOAK_FRONTEND_URL}
|
|
volumes:
|
|
- ./keycloak:/opt/keycloak/data/import
|
|
command: >
|
|
start-dev --import-realm
|
|
depends_on:
|
|
- postgres
|
|
|
|
postgres:
|
|
container_name: kg-postgres
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_DB: keycloak
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- ./postgres/data:/var/lib/postgresql/data
|