docker-compose.yaml 725 B

1234567891011121314151617181920212223242526272829303132
  1. services:
  2. backend:
  3. build:
  4. context: backend
  5. target: dev-envs
  6. ports:
  7. - 8080:8080
  8. secrets:
  9. - db-password
  10. volumes:
  11. - /var/run/docker.sock:/var/run/docker.sock
  12. db:
  13. # We use a mariadb image which supports both amd64 & arm64 architecture
  14. image: mariadb:10.6.4-focal
  15. # If you really want to use MySQL, uncomment the following line
  16. #image: mysql:8.0.27
  17. restart: always
  18. secrets:
  19. - db-password
  20. volumes:
  21. - db-data:/var/lib/mysql
  22. environment:
  23. - MYSQL_DATABASE=example
  24. - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
  25. expose:
  26. - 3306
  27. - 33060
  28. volumes:
  29. db-data:
  30. secrets:
  31. db-password:
  32. file: db/password.txt