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