From 5d50f29b47589c5fa12fbf8262cb0e8b1816ed63 Mon Sep 17 00:00:00 2001 From: usr0 Date: Wed, 11 Feb 2026 15:09:16 +0100 Subject: [PATCH] =?UTF-8?q?euh=20je=20sais=20pas=20j'ai=20juste=20pull=20e?= =?UTF-8?q?t=20=C3=A7a=20a=20cass=C3=A9=20des=20trucs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose.yml | 81 +++++++++++++++++++++++ dockerfiles/back/DockerfileUsingApiNative | 1 + dockerfiles/front/Dockerfile | 2 +- nginx.conf | 0 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 compose.yml create mode 100644 nginx.conf diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..8618416 --- /dev/null +++ b/compose.yml @@ -0,0 +1,81 @@ +services: + nginx: + build: + context: .. + dockerfile: dockerfiles/nginx/Dockerfile + ports: + - "80:80" + depends_on: + - db + - etherpad + networks: + - app-network + + front: + build: + context: . + dockerfile: dockerfiles/front/Dockerfile + + ports: + - "5000:80" + volumes: + - ./doodlestudent/front:/app + environment: + - FLASK_ENV=development + networks: + - app-network + + back: + build: + context: . + dockerfile: dockerfiles/back/DockerfileUsingApiNative + ports: + - "8080:8080" + volumes: + - ./doodlestudent/api:/app + environment: + - FLASK_ENV=development + depends_on: + db: + condition: service_healthy + networks: + - app-network + + db: + image: mysql + ports: + - "3306:3306" + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=tlc + - MYSQL_USER=tlc + - MYSQL_PASSWORD=tlc + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u tlc", "-p tlc"] + interval: 5s + timeout: 5s + retries: 10 + networks: + - app-network + + etherpad: + image: etherpad/etherpad + ports: + - "9001:9001" + volumes: + - ./doodlestudent/api/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt + networks: + - app-network + + mail: + image: bytemark/smtp + restart: always + ports: + - "2525:25" + networks: + - app-network + +networks: + app-network: + external: false + name: app-network \ No newline at end of file diff --git a/dockerfiles/back/DockerfileUsingApiNative b/dockerfiles/back/DockerfileUsingApiNative index d24c499..3ec6c40 100644 --- a/dockerfiles/back/DockerfileUsingApiNative +++ b/dockerfiles/back/DockerfileUsingApiNative @@ -29,6 +29,7 @@ RUN chown 1001 /work \ EXPOSE 8080 USER 1001 +#ENV quarkus_datasource_jdbc_url "jdbc:mysql://db:3306/tlc?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true&serverTimezone=Europe/Paris" ENV quarkus_datasource_jdbc_url "jdbc:mysql://db:3306/tlc?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true&serverTimezone=Europe/Paris" ENV quarkus_datasource_username tlc ENV quarkus_datasource_password tlc diff --git a/dockerfiles/front/Dockerfile b/dockerfiles/front/Dockerfile index 9e9b705..0515c40 100644 --- a/dockerfiles/front/Dockerfile +++ b/dockerfiles/front/Dockerfile @@ -14,7 +14,7 @@ FROM nginx:alpine COPY --from=build /app/dist/tlcfront /usr/share/nginx/html -EXPOSE 80 +EXPOSE 80 5000 CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..e69de29