diff --git a/.gitignore b/.gitignore index 2db878e..778b09e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ # build directory -build/ \ No newline at end of file +build/ + +# docker dev build +docker/ +docker-compose.yml diff --git a/README.md b/README.md index ba445fa..638245c 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,37 @@ v0.0.0: version ## Developpement - Golang -- Docker \ No newline at end of file +- Docker + +### with docker compose + +```bash +cat < docker-compose.yml +version: '3.1' + +services: + postgres: + image: postgres:15.2-alpine3.17 + restart: unless-stopped + environment: + POSTGRES_USER: 'acc' + POSTGRES_PASSWORD: 'totor' + POSTGRES_DB: 'accounts' + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 + users: + build: + context: . + target: develop + ports: + - 127.0.0.1:2300:1222 + volumes: + - ./docker/keys:/keys + depends_on: + postgres: + condition: service_healthy +ENDFILE +``` \ No newline at end of file