Skip to content

Commit

Permalink
[DONE] Add a submit button on the add video page (#1088)
Browse files Browse the repository at this point in the history
* Add a submit button on the add video page, to let user choose if he want to upload or not, and have more time to choose transcription lang
+ Add a required checkbox for legal notice

* undo typo in previous commit

* Replace deprecated `docker-compose` (v1) by `docker compose` (v2)
+ php code formatting

* Compiled .mo files

* Minor corrections

* add required star on legal notice checkbox
  • Loading branch information
Badatos authored Apr 9, 2024
1 parent 3621251 commit 176de77
Show file tree
Hide file tree
Showing 18 changed files with 1,098 additions and 924 deletions.
2 changes: 1 addition & 1 deletion .env.dev-exemple
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DJANGO_SUPERUSER_USERNAME=<USER>
DJANGO_SUPERUSER_PASSWORD=<PWD>
DJANGO_SUPERUSER_EMAIL=<MAIL>
### You can use internal registry
ELASTICSEARCH_TAG=elasticsearch:8.8.1
ELASTICSEARCH_TAG=elasticsearch:8.13.0
NODE_TAG=node:19
PYTHON_TAG=python:3.9-buster
REDIS_TAG=redis:alpine3.16
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pod_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Flake8 compliance
run: |
flake8 --max-complexity=7 --ignore=E501,W503,E203 --exclude .git,pod/*/migrations/*.py,*_settings.py
## Start remote encoding and transcoding test ##
- name: Create settings local file
run: |
Expand All @@ -93,8 +93,8 @@ jobs:
sudo rm -rf ./pod/log
sudo rm -rf ./pod/static
sudo rm -rf ./pod/node_modules
docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml up --detach --force-recreate --always-recreate-deps
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml up --detach --force-recreate --always-recreate-deps
- name: Sleep for 60 seconds to wait run server on pod back
uses: jakejarvis/wait-action@master
with:
Expand All @@ -107,19 +107,19 @@ jobs:
docker exec pod-back-with-volumes python manage.py loaddata pod/video/fixtures/sample_videos.json
- name: run test in docker
run: docker exec pod-back-with-volumes coverage run --append --source='.' manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode

- name: Run pa11y-ci full
run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config.json

- name: Run pa11y-ci mobile
run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config_mobile.json

- name: show pa11y results
run: cat pa11y-results.json

- name: Stop containers
if: always()
run: docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml down
run: docker compose -f ./docker-compose-full-dev-with-volumes-test.yml down
- name: delete unused file and change owner
run: |
sudo rm -f pod/custom/settings_local.py
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ createconfigs:
# Use for docker run and docker exec commands
-include .env.dev
export
COMPOSE = docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL = docker-compose -f ./docker-compose-full-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL_TEST = docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod
COMPOSE = docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL = docker compose -f ./docker-compose-full-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL_TEST = docker compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod
DOCKER_LOGS = docker logs -f

#docker-start-build:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev-with-volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
- ./.env.dev
ports:
- 6379:6379

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-full-dev-with-volumes-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
env_file:
- ./.env.dev
volumes: *pod-volumes

pod-transcript:
container_name: pod-transcript-with-volumes
build:
Expand Down Expand Up @@ -83,7 +83,7 @@ services:
depends_on:
- pod-back
volumes: *pod-volumes

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-full-dev-with-volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
env_file:
- ./.env.dev
volumes: *pod-volumes

pod-transcript:
container_name: pod-transcript-with-volumes
build:
Expand Down Expand Up @@ -74,7 +74,7 @@ services:
- ./.env.dev
ports:
- 6379:6379

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ v1.2, 2023-08-30
:toc-title: Liste des rubriques
:imagesdir: ./images

== Docker / docker-compose avec volumes sur la machine hôte
== Docker / docker compose avec volumes sur la machine hôte

=== Conteneur ElasticSearch
http://localhost:9200
Expand Down
16 changes: 8 additions & 8 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ for /f "delims=" %%a in (.env.dev) do call set %%a
if /i "%1"=="docker-build" (
echo "Suppression du repertoire node_modules"
rmdir /s /q .\pod\node_modules
echo "Suppression du repertoire node_modules"
echo "Suppression du repertoire static"
rmdir /s /q .\pod\static
echo "Suppression du repertoire log"
rmdir /s /q .\pod\log
echo "Chargement des variables d'environnement depuis le fichier .env.dev"
for /f "delims=" %%a in (.env.dev) do call set %%a
echo "Debut du build"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=%ELASTICSEARCH_TAG% --build-arg NODE_VERSION=%NODE_TAG% --build-arg PYTHON_VERSION=%PYTHON_TAG% --no-cache
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=%ELASTICSEARCH_TAG% --build-arg NODE_VERSION=%NODE_TAG% --build-arg PYTHON_VERSION=%PYTHON_TAG% --no-cache
echo "Debut du start"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
echo "Vous devriez obtenir ce message une fois esup-pod lance"
echo "pod-dev-with-volumes | Superuser created successfully."
echo "Fin du build"
) else if /i "%1"=="docker-start" (
echo "Debut du start"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
echo "Fin du start"
) else if /i "%1"=="docker-stop" (
echo "Debut du stop"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
echo "Fin du stop"
) else if /i "%1"=="docker-reset" (
echo "Debut du reset"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
echo "Suppression du repertoire node_modules"
rmdir /s /q .\pod\node_modules
echo "Suppression du repertoire node_modules"
echo "Suppression du repertoire static"
rmdir /s /q .\pod\static
echo "Suppression du repertoire log"
rmdir /s /q .\pod\log
echo "Suppression du repertoire db_migrations"
rmdir /s /q .\pod\db_migrations
echo "Suppression du repertoire db.sqlite3"
echo "Suppression du fichier db.sqlite3"
del /s /q .\pod\db.sqlite3
echo "Suppression du repertoire media"
rmdir /s /q .\pod\media
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 176de77

Please sign in to comment.