github.com/lovung/GoCleanArchitecture@v0.0.0-20210302152432-50d91fd29f9f/docker-compose.yml (about) 1 version: "3.8" 2 3 services: 4 # app: 5 # build: 6 # context: ./.realize 7 # container_name: gocleanarchitecture 8 # volumes: 9 # - .:/gocleanarchitecture/ 10 # working_dir: /gocleanarchitecture 11 # environment: 12 # - ENV 13 # - MYSQL_HOST 14 # - MYSQL_PORT 15 # - LOG_LEVEL 16 # ports: 17 # - 10000:10000 18 # logging: 19 # driver: "json-file" 20 # options: 21 # max-file: "3" 22 # max-size: "5m" 23 # depends_on: 24 # - db 25 26 # redis: 27 # image: redis 28 # ports: 29 # - 16379:6379 30 # configs: 31 # - redis_config 32 # volumes: 33 # - gocleanarchitectureredis:/data 34 35 db: 36 image: mysql:8.0 37 restart: always 38 volumes: 39 - gocleanarchitecturemysql:/var/lib/mysql 40 - ./databases/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql 41 ports: 42 - ${MYSQL_PORT}:3306 43 environment: 44 - MYSQL_ROOT_PASSWORD 45 - MYSQL_PASSWORD 46 - MYSQL_USER 47 - MYSQL_DATABASE 48 command: 49 [ 50 "mysqld", 51 "--character-set-server=utf8mb4", 52 "--collation-server=utf8mb4_unicode_ci", 53 "--default-authentication-plugin=mysql_native_password", 54 "--autocommit=OFF", 55 ] 56 57 # configs: 58 # redis_config: 59 # file: ./.redis.conf 60 61 volumes: 62 gocleanarchitecturemysql: 63 driver: local 64 # gocleanarchitectureredis: 65 # driver: local