Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. server:
  5. build:
  6. context: .
  7. volumes:
  8. # Mounts the project directory on the host to /app inside the container,
  9. # allowing you to modify the code without having to rebuild the image.
  10. - .:/app
  11. # Just specify a path and let the Engine create a volume.
  12. # Data present in the base image at the specified mount point will be copied
  13. # over to the new volume upon volume initialization.
  14. # node_modules from this new volume will be used and not from your local dev env.
  15. - /app/node_modules/
  16.  
  17. # Expose ports [HOST:CONTAINER}
  18. ports:
  19. - "4040:4040"
  20.  
  21. # Set environment variables from this file
  22. env_file:
  23. - .env
  24.  
  25. # Overwrite any env var defined in .env file (if required)
  26. environment:
  27. - NODE_ENV=development
  28.  
  29. # Link to containers in another service.
  30. # Links also express dependency between services in the same way as depends_on,
  31. # so they determine the order of service startup.
  32. links:
  33. - postgres
  34. postgres:
  35. image: "postgres:9.6"
  36. ports:
  37. - "5432:5432"
  38. environment:
  39. POSTGRES_PASSWORD: 123456
  40. POSTGRES_USER: postgres
  41. POSTGRES_DB: postgres
  42.  
  43. {
  44. "development": {
  45. "username": "postgres",
  46. "password": "123456",
  47. "database": "mydb",
  48. "host": "127.0.0.1",
  49. "dialect": "postgres",
  50. "pool": {
  51. "max": 100,
  52. "min": 0,
  53. "idle": 10000
  54. }
  55. },
  56. "test": {
  57. "username": "postgres",
  58. "password": "123456",
  59. "database": "mytestdb",
  60. "host": "127.0.0.1",
  61. "dialect": "postgres"
  62. },
  63. "production": {
  64. "username": "postgres",
  65. "password": "123456",
  66. "database": "mydb",
  67. "host": "127.0.0.1",
  68. "dialect": "postgres"
  69. }
  70. }
  71.  
  72. import database from '../../config/database.json'
  73.  
  74. const sequelize = new Sequelize(dbConfig.database, dbConfig.username, dbConfig.password, dbConfig)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement