From fbabaae7dfecc0f7d228b7e83d0665a0cdce4758 Mon Sep 17 00:00:00 2001 From: Rocher Date: Tue, 22 Oct 2024 09:10:59 +0200 Subject: [PATCH] test --- .drone.yml | 41 +++++++++++++++++++++++++++++++++++++++++ docker/Dockerfile | 5 +++++ 2 files changed, 46 insertions(+) create mode 100644 .drone.yml create mode 100644 docker/Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..801bfd4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,41 @@ +kind: pipeline +type: docker +name: Deploiement + +trigger: + event: + + + push + + +steps: + + + name: Build and Push + image: plugins/docker + settings: + dockerfile: docker/Dockerfile + context: scripts + registry: hub.codefirst.iut.uca.fr + mirror: https://proxy.iut.uca.fr:8443/ + repo: hub.codefirst.iut.uca.fr/WikiFantasy/WF-Database + username: + from_secret: SECRET_REGISTRY_USERNAME + password: + from_secret: SECRET_REGISTRY_PASSWORD + name: Deploy + image: hub.codefirst.iut.uca.fr/clement.freville2/plugins/kaniko:latest + environment: + IMAGENAME: hub.codefirst.iut.uca.fr/WikiFantasy/WF-Database + CONTAINERNAME: ASCAS-SQL + COMMAND: create + OVERWRITE: false + PRIVATE: true + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: + from_secret: POSTGRES_PASSWORD + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: + from_secret: POSTGRES_DB + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: + from_secret: POSTGRES_USER + ADMINS: maximerocher \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..78223cf --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM postgres:17-alpine3.20 AS base + +COPY init.sql /docker-entrypoint-initdb.d + +EXPOSE 5432 \ No newline at end of file