diff --git a/.drone.yml b/.drone.yml index 661cfb1..f3ce6f5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,23 +7,11 @@ trigger: - 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/celeste.barbosa/codefirst-dockerproxy-clientdrone + - name: deploy-container-postgresql + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: - IMAGENAME: hub.codefirst.iut.uca.fr/wikifantasy/wf-database - CONTAINERNAME: WF_DATABASE + IMAGENAME: postgres:17-alpine + CONTAINERNAME: wf-database COMMAND: create OVERWRITE: false PRIVATE: true @@ -33,3 +21,6 @@ steps: from_secret: POSTGRES_DB CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: from_secret: POSTGRES_USER + CODEFIRST_CLIENTDRONE_ENV_TRAEFIK_LABELS: true + ADMINS: marocher8, maximerocher , kentinbrongniart + diff --git a/docker/Dockerfile b/docker/Dockerfile index 78223cf..a035a57 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,8 @@ +# Utiliser l'image officielle de PostgreSQL FROM postgres:17-alpine3.20 AS base -COPY init.sql /docker-entrypoint-initdb.d +# Copier le fichier init.sql depuis le dossier docker-entrypoint-initdb.d +COPY scripts/init.sql /docker-entrypoint-initdb.d/ -EXPOSE 5432 \ No newline at end of file +# Exposer le port PostgreSQL par défaut +EXPOSE 5432