Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. version: '3'
  2. services:
  3. app:
  4. container_name: full_app
  5. build: .
  6. ports:
  7. - 8080:8080
  8. restart: on-failure
  9. volumes:
  10. - api:/usr/src/app/
  11. depends_on:
  12. - fullstack-postgres
  13. networks:
  14. - fullstack
  15.  
  16.  
  17. fullstack-postgres:
  18. image: postgres:latest
  19. container_name: full_db_postgres
  20. environment:
  21. - POSTGRES_USER=${DB_USER}
  22. - POSTGRES_PASSWORD=${DB_PASSWORD}
  23. - POSTGRES_DB=${DB_NAME}
  24. - DATABASE_HOST=${DB_HOST}
  25. ports:
  26. - '5432:5432'
  27. volumes:
  28. - database_postgres:/var/lib/postgresql/data
  29. networks:
  30. - fullstack
  31.  
  32. pgadmin:
  33. image: dpage/pgadmin4
  34. container_name: pgadmin_container
  35. environment:
  36. PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
  37. PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
  38. depends_on:
  39. - fullstack-postgres
  40. ports:
  41. - "5050:80"
  42. networks:
  43. - fullstack
  44. restart: unless-stopped
  45.  
  46. volumes:
  47. api:
  48. database_postgres:
  49.  
  50. # Networks to be created to facilitate communication between containers
  51. networks:
  52. fullstack:
  53. driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement