You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

3 years ago
  1. version: "3.3"
  2. services:
  3. db:
  4. container_name: project_db
  5. image: postgres:12
  6. # build:
  7. # context: ./Docker
  8. # dockerfile: db.Dockerfile
  9. environment:
  10. POSTGRES_DB: 'codegen_db'
  11. POSTGRES_USER: 'codegen_user'
  12. POSTGRES_PASSWORD: 'password'
  13. # volumes:
  14. # - ./var/pgdata:/var/lib/postgresql/data
  15. ports:
  16. - "5432:5433"
  17. # network_mode: host
  18. backend:
  19. container_name: project_backend
  20. build:
  21. context: .
  22. dockerfile: app.Dockerfile
  23. # ports:
  24. # - "9000:9001"
  25. environment:
  26. POSTGRES_DB: 'codegen_db'
  27. CODEGEN_DB_HOST: 'project_db'
  28. CODEGEN_DB_NAME: 'codegen_db'
  29. CODEGEN_DB_USER: 'codegen_user'
  30. CODEGEN_DB_PASSWORD: 'password'
  31. volumes:
  32. - ./app:/usr/src/app/bin
  33. # links:
  34. # - db
  35. # # command: ["./wait-for-it.sh", "project_db:5432", "--strict" , "--timeout=30000" , "--" , "echo 'db has started'"]
  36. # depends_on:
  37. # - db
  38. # # condition: service_healthy