Skip to content

Instantly share code, notes, and snippets.

@ontologiae
Created April 30, 2024 18:15
Show Gist options
  • Save ontologiae/94bc530fa29e02d385acb883a3e799c1 to your computer and use it in GitHub Desktop.
Save ontologiae/94bc530fa29e02d385acb883a3e799c1 to your computer and use it in GitHub Desktop.
docker compose chaine chargement sql
version: '3.8'
services:
csv2sql:
image: csv2sql:latest # Remplacez par le nom/tag de votre image Docker
build: ./csv2sql
volumes:
- data:/home/opam/csvsql
entrypoint: /bin/sh -c "while true; do sleep 30; done" # Garder le conteneur en vie pour l'exécution des commandes
postgres:
image: postgres:latest
volumes:
- data:/docker-entrypoint-initdb.d/ # Script pour charger le fichier SQL dans PostgreSQL
environment:
POSTGRES_DB: arboretum
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
data:
@da-max
Copy link

da-max commented Apr 30, 2024

version: '3.8'
services:
  csv2sql:
    image: csv2sql:latest  # Remplacez par le nom/tag de votre image Docker
    build: ./csv2sql
    volumes:
      - .:/home/opam/csvsql
    entrypoint: /bin/sh -c "while true; do sleep 30; done"  # Garder le conteneur en vie pour l'exécution des commandes

  postgres:
    image: postgres:latest
    volumes:
      - .:/docker-entrypoint-initdb.d/  # Script pour charger le fichier SQL dans PostgreSQL
    environment:
      POSTGRES_DB: arboretum
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment