Files
Chromacase/docker-compose.yml
Clément Le Bihan 56fdadc705 Docker fix (#114)
* fix: db healthcheck

* fixed missing front build argument

* fix: db healthcheck user

* message from db 'user' doesnt exist fixed

* rm: useless yarn

Co-authored-by: GitBluub <louis.auzuret@gmail.com>
2022-12-20 18:35:34 +01:00

39 lines
734 B
YAML

services:
back:
build: ./back
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
env_file:
- .env
volumes:
- ./musics:/musics
db:
container_name: db
image: postgres:alpine3.14
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
front:
build:
context: ./front
args:
- API_URL=${API_URL}
ports:
- "80:80"
depends_on:
- "back"
env_file:
- .env