docker-compose.yml 663 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. services:
  2. app:
  3. hostname: app
  4. networks:
  5. - mynet
  6. environment:
  7. MYSQL_HOST: mysql
  8. MYSQL_USER: root
  9. MYSQL_PASSWORD: secret
  10. MYSQL_DB: todos
  11. MYSQL_PORT: 3306
  12. working_dir: /app
  13. build: ./app
  14. depends_on:
  15. - mysql
  16. #volumes:
  17. #- ./app:/app
  18. restart: always
  19. mysql:
  20. image: mariadb:latest
  21. hostname: mysql
  22. networks:
  23. - mynet
  24. environment:
  25. MYSQL_ROOT_PASSWORD: secret
  26. MYSQL_DATABASE: todos
  27. ports:
  28. - 33060:33060
  29. - 3306:3306
  30. volumes:
  31. - ./volumes/mysql:/var/lib/mysql
  32. #volumes:
  33. #todo-mysql-data:
  34. networks:
  35. mynet:
  36. driver: bridge