-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ⚗️ edit code to run with new ansible directories
- Loading branch information
1 parent
8db2562
commit 8822d95
Showing
5 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# TODO : Ajouter server, db et keycloak | ||
|
||
version: '3.9' | ||
|
||
services: | ||
keycloak: | ||
restart: always | ||
image: quay.io/keycloak/keycloak:19.0.2 | ||
container_name: dso-console_keycloak | ||
ports: | ||
- 8090:8080 | ||
volumes: | ||
- ../keycloak/realms:/opt/keycloak/data/import | ||
environment: | ||
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN:-admin} | ||
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin} | ||
command: start-dev --import-realm | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://localhost:8080" ] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 10 | ||
networks: | ||
- dso-network | ||
|
||
postgres: | ||
restart: always | ||
image: postgres:14.5 | ||
container_name: dso-console_postgres | ||
environment: | ||
POSTGRES_DB: ${POSTGRES_DATABASE} | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
networks: | ||
- dso-network | ||
|
||
server: | ||
restart: always | ||
build: | ||
context: .. | ||
dockerfile: apps/server/Dockerfile | ||
target: prod | ||
image: dso/console/server:demo | ||
container_name: dso-console_server | ||
depends_on: | ||
keycloak: | ||
condition: service_healthy | ||
postgres: | ||
condition: service_started | ||
ports: | ||
- 4000:80 | ||
environment: | ||
SERVER_PORT: 80 | ||
DB_HOST: postgres | ||
DB_PORT: ${POSTGRES_PORT} | ||
DB_USER: ${POSTGRES_USER} | ||
DB_PASS: ${POSTGRES_PASSWORD} | ||
DB_NAME: ${POSTGRES_DATABASE} | ||
SESSION_SECRET: ${SESSION_SECRET} | ||
KEYCLOAK_DOMAIN: keycloak:8080 | ||
KEYCLOAK_REALM: ${KEYCLOAK_REALM} | ||
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID_BACKEND} | ||
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET_BACKEND} | ||
KEYCLOAK_REDIRECT_URI: ${KEYCLOAK_REDIRECT_URI} | ||
ANSIBLE_HOST: ansible-api | ||
ANSIBLE_PORT: ${ANSIBLE_PORT} | ||
NODE_ENV: production | ||
networks: | ||
- dso-network | ||
|
||
ansible-api: | ||
restart: always | ||
build: | ||
context: .. | ||
dockerfile: apps/ansible-api/Dockerfile | ||
target: prod | ||
image: dso/console/ansible-api:demo | ||
container_name: dso-console_ansible-api | ||
depends_on: | ||
keycloak: | ||
condition: service_healthy | ||
ports: | ||
- 8100:8100 | ||
volumes: | ||
- ../ansible/.vault-secret:${CONFIG_DIR:-/config}/.vault-secret | ||
- ../ansible/.kubeconfig:${CONFIG_DIR:-/config}/.kubeconfig | ||
- ../ansible/playbooks:${PLAYBOOK_DIR:-/dso} | ||
environment: | ||
PLAYBOOK_DIR: ${PLAYBOOK_DIR:-/dso} | ||
CONFIG_DIR: ${CONFIG_DIR:-/config} | ||
ANSIBLE_PORT: ${ANSIBLE_PORT} | ||
SESSION_SECRET: ${SESSION_SECRET:-a-very-strong-secret-with-more-than-32-char} | ||
KEYCLOAK_PROTOCOL: ${KEYCLOAK_PROTOCOL:-http} | ||
KEYCLOAK_DOMAIN: keycloak:8080 | ||
KEYCLOAK_REALM: ${KEYCLOAK_REALM:-cloud-pi-native} | ||
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID_BACKEND:-dso-console-ansible-api} | ||
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET_BACKEND:-client-secret-ansible-api} | ||
NODE_ENV: production | ||
networks: | ||
- dso-network | ||
|
||
client: | ||
build: | ||
context: .. | ||
dockerfile: apps/client/Dockerfile | ||
target: prod | ||
image: dso/console/client:demo | ||
container_name: dso-console_client | ||
depends_on: | ||
server: | ||
condition: service_started | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
KEYCLOAK_PROTOCOL: ${KEYCLOAK_PROTOCOL} | ||
KEYCLOAK_DOMAIN: localhost:8090 | ||
KEYCLOAK_REALM: ${KEYCLOAK_REALM} | ||
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID_FRONTEND} | ||
KEYCLOAK_REDIRECT_URI: ${KEYCLOAK_REDIRECT_URI} | ||
SERVER_HOST: server | ||
SERVER_PORT: 80 | ||
networks: | ||
- dso-network | ||
|
||
networks: | ||
dso-network: | ||
name: dso-network | ||
# driver_opts: | ||
# com.docker.network.driver.mtu: 1450 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters