mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-27 04:09:26 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 543ac20d66 | |||
| 1d42dd26ed |
@@ -152,7 +152,7 @@ jobs:
|
|||||||
uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
docker-build-args: '-f src/summary/Dockerfile --target production'
|
docker-build-args: '-f src/summary/Dockerfile --target summary-production'
|
||||||
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}'
|
||||||
docker-context: './src/summary'
|
docker-context: './src/summary'
|
||||||
-
|
-
|
||||||
@@ -161,7 +161,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./src/summary
|
context: ./src/summary
|
||||||
file: ./src/summary/Dockerfile
|
file: ./src/summary/Dockerfile
|
||||||
target: production
|
target: summary-production
|
||||||
build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000
|
build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
@@ -191,7 +191,7 @@ jobs:
|
|||||||
uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
docker-build-args: '-f src/agents/Dockerfile --target production'
|
docker-build-args: '-f src/agents/Dockerfile --target agents-production'
|
||||||
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}'
|
||||||
docker-context: './src/agents'
|
docker-context: './src/agents'
|
||||||
-
|
-
|
||||||
@@ -200,7 +200,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./src/agents
|
context: ./src/agents
|
||||||
file: ./src/agents/Dockerfile
|
file: ./src/agents/Dockerfile
|
||||||
target: production
|
target: agents-production
|
||||||
build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000
|
build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ DOCKER_GID = $(shell id -g)
|
|||||||
DOCKER_USER = $(DOCKER_UID):$(DOCKER_GID)
|
DOCKER_USER = $(DOCKER_UID):$(DOCKER_GID)
|
||||||
COMPOSE = DOCKER_USER=$(DOCKER_USER) docker compose
|
COMPOSE = DOCKER_USER=$(DOCKER_USER) docker compose
|
||||||
COMPOSE_EXEC = $(COMPOSE) exec
|
COMPOSE_EXEC = $(COMPOSE) exec
|
||||||
COMPOSE_EXEC_APP = $(COMPOSE_EXEC) app-dev
|
COMPOSE_EXEC_APP = $(COMPOSE_EXEC) app-development
|
||||||
COMPOSE_RUN = $(COMPOSE) run --rm
|
COMPOSE_RUN = $(COMPOSE) run --rm
|
||||||
COMPOSE_RUN_APP = $(COMPOSE_RUN) app-dev
|
COMPOSE_RUN_APP = $(COMPOSE_RUN) app-development
|
||||||
COMPOSE_RUN_CROWDIN = $(COMPOSE_RUN) crowdin crowdin
|
COMPOSE_RUN_CROWDIN = $(COMPOSE_RUN) crowdin crowdin
|
||||||
WAIT_DB = @$(COMPOSE_RUN) dockerize -wait tcp://$(DB_HOST):$(DB_PORT) -timeout 60s
|
WAIT_DB = @$(COMPOSE_RUN) dockerize -wait tcp://$(DB_HOST):$(DB_PORT) -timeout 60s
|
||||||
|
|
||||||
@@ -94,8 +94,8 @@ build: ## build the project containers
|
|||||||
@$(MAKE) build-frontend
|
@$(MAKE) build-frontend
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
|
||||||
build-backend: ## build the app-dev container
|
build-backend: ## build the app-development container
|
||||||
@$(COMPOSE) build app-dev
|
@$(COMPOSE) build app-development
|
||||||
.PHONY: build-backend
|
.PHONY: build-backend
|
||||||
|
|
||||||
|
|
||||||
@@ -107,12 +107,12 @@ down: ## stop and remove containers, networks, images, and volumes
|
|||||||
@$(COMPOSE) down
|
@$(COMPOSE) down
|
||||||
.PHONY: down
|
.PHONY: down
|
||||||
|
|
||||||
logs: ## display app-dev logs (follow mode)
|
logs: ## display app-development logs (follow mode)
|
||||||
@$(COMPOSE) logs -f app-dev
|
@$(COMPOSE) logs -f app-development
|
||||||
.PHONY: logs
|
.PHONY: logs
|
||||||
|
|
||||||
run-backend: ## start only the backend application and all needed services
|
run-backend: ## start only the backend application and all needed services
|
||||||
@$(COMPOSE) up --force-recreate -d celery-dev
|
@$(COMPOSE) up --force-recreate -d celery-development
|
||||||
@echo "Wait for postgresql to be up..."
|
@echo "Wait for postgresql to be up..."
|
||||||
@$(WAIT_DB)
|
@$(WAIT_DB)
|
||||||
.PHONY: run-backend
|
.PHONY: run-backend
|
||||||
@@ -227,14 +227,14 @@ back-i18n-generate: ## create the .pot files used for i18n
|
|||||||
@$(MANAGE) makemessages -a --keep-pot
|
@$(MANAGE) makemessages -a --keep-pot
|
||||||
.PHONY: back-i18n-generate
|
.PHONY: back-i18n-generate
|
||||||
|
|
||||||
shell: ## connect to database shell
|
shell: ## open a Django Python shell
|
||||||
@$(MANAGE) shell #_plus
|
@$(MANAGE) shell #_plus
|
||||||
.PHONY: dbshell
|
.PHONY: shell
|
||||||
|
|
||||||
# -- Database
|
# -- Database
|
||||||
|
|
||||||
dbshell: ## connect to database shell
|
dbshell: ## connect to database shell
|
||||||
docker compose exec app-dev python manage.py dbshell
|
docker compose exec app-development python manage.py dbshell
|
||||||
.PHONY: dbshell
|
.PHONY: dbshell
|
||||||
|
|
||||||
resetdb: FLUSH_ARGS ?=
|
resetdb: FLUSH_ARGS ?=
|
||||||
@@ -348,16 +348,16 @@ build-k8s-cluster: ## build the kubernetes cluster using kind
|
|||||||
|
|
||||||
install-external-secrets: ## install the kubernetes secrets from Vaultwarden
|
install-external-secrets: ## install the kubernetes secrets from Vaultwarden
|
||||||
./bin/install-external-secrets.sh
|
./bin/install-external-secrets.sh
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: install-external-secrets
|
||||||
|
|
||||||
start-tilt: ## start the kubernetes cluster using kind
|
start-tilt: ## start the kubernetes cluster using kind
|
||||||
tilt up -f ./bin/Tiltfile
|
tilt up -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: start-tilt
|
||||||
|
|
||||||
start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak
|
start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak
|
||||||
DEV_ENV=dev-keycloak tilt up -f ./bin/Tiltfile
|
DEV_ENV=dev-keycloak tilt up -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: start-tilt-keycloak
|
||||||
|
|
||||||
start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles
|
start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles
|
||||||
DEV_ENV=dev-dinum tilt up -f ./bin/Tiltfile
|
DEV_ENV=dev-dinum tilt up -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: start-tilt-dinum
|
||||||
|
|||||||
+2
-2
@@ -59,7 +59,7 @@ docker_build(
|
|||||||
context='../src/summary',
|
context='../src/summary',
|
||||||
dockerfile='../src/summary/Dockerfile',
|
dockerfile='../src/summary/Dockerfile',
|
||||||
only=['.'],
|
only=['.'],
|
||||||
target = 'production',
|
target = 'summary-production',
|
||||||
live_update=[
|
live_update=[
|
||||||
sync('../src/summary', '/app'),
|
sync('../src/summary', '/app'),
|
||||||
]
|
]
|
||||||
@@ -71,7 +71,7 @@ docker_build(
|
|||||||
context='../src/agents',
|
context='../src/agents',
|
||||||
dockerfile='../src/agents/Dockerfile',
|
dockerfile='../src/agents/Dockerfile',
|
||||||
only=['.'],
|
only=['.'],
|
||||||
target = 'production',
|
target = 'agents-production',
|
||||||
live_update=[
|
live_update=[
|
||||||
sync('../src/agents', '/app'),
|
sync('../src/agents', '/app'),
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -89,5 +89,5 @@ function _dc_exec() {
|
|||||||
#
|
#
|
||||||
# ARGS : django's manage.py command arguments
|
# ARGS : django's manage.py command arguments
|
||||||
function _django_manage() {
|
function _django_manage() {
|
||||||
_dc_run "app-dev" python manage.py "$@"
|
_dc_run "app-development" python manage.py "$@"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,5 +4,5 @@ source "$(dirname "${BASH_SOURCE[0]}")/_config.sh"
|
|||||||
|
|
||||||
_dc_run \
|
_dc_run \
|
||||||
-e DJANGO_CONFIGURATION=Test \
|
-e DJANGO_CONFIGURATION=Test \
|
||||||
app-dev \
|
app-development \
|
||||||
pytest "$@"
|
pytest "$@"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/_config.sh"
|
|||||||
|
|
||||||
_dc_run \
|
_dc_run \
|
||||||
-e DJANGO_CONFIGURATION=Test \
|
-e DJANGO_CONFIGURATION=Test \
|
||||||
app-dev \
|
app-development \
|
||||||
python manage.py spectacular \
|
python manage.py spectacular \
|
||||||
--api-version 'v1.0' \
|
--api-version 'v1.0' \
|
||||||
--urlconf 'meet.api_urls' \
|
--urlconf 'meet.api_urls' \
|
||||||
|
|||||||
+14
-14
@@ -55,13 +55,13 @@ services:
|
|||||||
entrypoint: >
|
entrypoint: >
|
||||||
sh -c "
|
sh -c "
|
||||||
/usr/bin/mc alias set meet http://minio:9000 meet password &&
|
/usr/bin/mc alias set meet http://minio:9000 meet password &&
|
||||||
/usr/bin/mc admin config set meet notify_webhook:meet-webhook endpoint='http://app-dev:8000/api/v1.0/recordings/storage-hook/' auth_token='Bearer password' &&
|
/usr/bin/mc admin config set meet notify_webhook:meet-webhook endpoint='http://app-development:8000/api/v1.0/recordings/storage-hook/' auth_token='Bearer password' &&
|
||||||
/usr/bin/mc admin service restart meet --wait --json &&
|
/usr/bin/mc admin service restart meet --wait --json &&
|
||||||
sleep 15 &&
|
sleep 15 &&
|
||||||
/usr/bin/mc event add meet/meet-media-storage arn:minio:sqs::meet-webhook:webhook --event put &&
|
/usr/bin/mc event add meet/meet-media-storage arn:minio:sqs::meet-webhook:webhook --event put &&
|
||||||
exit 0;"
|
exit 0;"
|
||||||
|
|
||||||
app-dev:
|
app-development:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: backend-development
|
target: backend-development
|
||||||
@@ -94,7 +94,7 @@ services:
|
|||||||
- resource-server
|
- resource-server
|
||||||
- default
|
- default
|
||||||
|
|
||||||
celery-dev:
|
celery-development:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: meet:backend-development
|
image: meet:backend-development
|
||||||
command: ["celery", "-A", "meet.celery_app", "worker", "-l", "DEBUG"]
|
command: ["celery", "-A", "meet.celery_app", "worker", "-l", "DEBUG"]
|
||||||
@@ -107,9 +107,9 @@ services:
|
|||||||
- ./src/backend:/app
|
- ./src/backend:/app
|
||||||
- ./data/static:/data/static
|
- ./data/static:/data/static
|
||||||
depends_on:
|
depends_on:
|
||||||
- app-dev
|
- app-development
|
||||||
|
|
||||||
app:
|
app-production:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: backend-production
|
target: backend-production
|
||||||
@@ -128,7 +128,7 @@ services:
|
|||||||
- livekit
|
- livekit
|
||||||
- minio
|
- minio
|
||||||
|
|
||||||
celery:
|
celery-production:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: meet:backend-production
|
image: meet:backend-production
|
||||||
command: ["celery", "-A", "meet.celery_app", "worker", "-l", "INFO"]
|
command: ["celery", "-A", "meet.celery_app", "worker", "-l", "INFO"]
|
||||||
@@ -138,7 +138,7 @@ services:
|
|||||||
- env.d/development/common
|
- env.d/development/common
|
||||||
- env.d/development/postgresql
|
- env.d/development/postgresql
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app-production
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:1.25
|
image: nginx:1.25
|
||||||
@@ -161,7 +161,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
VITE_API_BASE_URL: "http://localhost:8071"
|
VITE_API_BASE_URL: "http://localhost:8071"
|
||||||
VITE_APP_TITLE: "LaSuite Meet"
|
VITE_APP_TITLE: "LaSuite Meet"
|
||||||
image: meet:frontend-development
|
image: meet:frontend-production
|
||||||
ports:
|
ports:
|
||||||
- "3000:8080"
|
- "3000:8080"
|
||||||
|
|
||||||
@@ -249,10 +249,10 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
|
|
||||||
app-summary-dev:
|
app-summary-development:
|
||||||
build:
|
build:
|
||||||
context: src/summary
|
context: src/summary
|
||||||
target: development
|
target: summary-development
|
||||||
args:
|
args:
|
||||||
DOCKER_USER: ${DOCKER_USER:-1000}
|
DOCKER_USER: ${DOCKER_USER:-1000}
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
@@ -270,7 +270,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./src/summary
|
context: ./src/summary
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
target: production
|
target: summary-production
|
||||||
command: celery -A summary.core.celery_worker worker --pool=solo --loglevel=debug -Q transcribe-queue
|
command: celery -A summary.core.celery_worker worker --pool=solo --loglevel=debug -Q transcribe-queue
|
||||||
env_file:
|
env_file:
|
||||||
- env.d/development/summary
|
- env.d/development/summary
|
||||||
@@ -278,7 +278,7 @@ services:
|
|||||||
- ./src/summary:/app
|
- ./src/summary:/app
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-summary
|
- redis-summary
|
||||||
- app-summary-dev
|
- app-summary-development
|
||||||
- minio
|
- minio
|
||||||
develop:
|
develop:
|
||||||
watch:
|
watch:
|
||||||
@@ -290,7 +290,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./src/summary
|
context: ./src/summary
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
target: production
|
target: summary-production
|
||||||
command: celery -A summary.core.celery_worker worker --pool=solo --loglevel=debug -Q summarize-queue
|
command: celery -A summary.core.celery_worker worker --pool=solo --loglevel=debug -Q summarize-queue
|
||||||
env_file:
|
env_file:
|
||||||
- env.d/development/summary
|
- env.d/development/summary
|
||||||
@@ -298,7 +298,7 @@ services:
|
|||||||
- ./src/summary:/app
|
- ./src/summary:/app
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-summary
|
- redis-summary
|
||||||
- app-summary-dev
|
- app-summary-development
|
||||||
- minio
|
- minio
|
||||||
develop:
|
develop:
|
||||||
watch:
|
watch:
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ keys:
|
|||||||
webhook:
|
webhook:
|
||||||
api_key: devkey
|
api_key: devkey
|
||||||
urls:
|
urls:
|
||||||
- http://app-dev:8000/api/v1.0/rooms/webhooks-livekit/
|
- http://app-development:8000/api/v1.0/rooms/webhooks-livekit/
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ ALLOW_UNREGISTERED_ROOMS=False
|
|||||||
RECORDING_ENABLE=True
|
RECORDING_ENABLE=True
|
||||||
RECORDING_STORAGE_EVENT_ENABLE=True
|
RECORDING_STORAGE_EVENT_ENABLE=True
|
||||||
RECORDING_STORAGE_EVENT_TOKEN=password
|
RECORDING_STORAGE_EVENT_TOKEN=password
|
||||||
SUMMARY_SERVICE_ENDPOINT=http://app-summary-dev:8000/api/v1/tasks/
|
SUMMARY_SERVICE_ENDPOINT=http://app-summary-development:8000/api/v1/tasks/
|
||||||
SUMMARY_SERVICE_API_TOKEN=password
|
SUMMARY_SERVICE_API_TOKEN=password
|
||||||
RECORDING_DOWNLOAD_BASE_URL=http://localhost:3000/recording
|
RECORDING_DOWNLOAD_BASE_URL=http://localhost:3000/recording
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_NAME="meet-app-summary-dev"
|
APP_NAME="meet-app-summary-development"
|
||||||
APP_API_TOKEN="password"
|
APP_API_TOKEN="password"
|
||||||
|
|
||||||
AWS_STORAGE_BUCKET_NAME="http://meet-media-storage"
|
AWS_STORAGE_BUCKET_NAME="http://meet-media-storage"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ COPY pyproject.toml .
|
|||||||
RUN mkdir /install && \
|
RUN mkdir /install && \
|
||||||
pip install --prefix=/install .
|
pip install --prefix=/install .
|
||||||
|
|
||||||
FROM base AS production
|
FROM base AS agents-production
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ COPY pyproject.toml .
|
|||||||
|
|
||||||
RUN pip3 install --no-cache-dir .
|
RUN pip3 install --no-cache-dir .
|
||||||
|
|
||||||
FROM base AS development
|
FROM base AS summary-development
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
@@ -24,7 +24,7 @@ RUN pip3 install --no-cache-dir -e ".[dev]" || pip3 install --no-cache-dir -e .
|
|||||||
|
|
||||||
CMD ["uvicorn", "summary.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
CMD ["uvicorn", "summary.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||||
|
|
||||||
FROM base AS production
|
FROM base AS summary-production
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user