System

docker-compose

사리생성 2024. 2. 14. 12:01

 

 

 

mysql

version: '3'
services:
  mysql:
    image: mysql:8.0
    volumes:
      - "./mysql-data/db:/var/lib/mysql"
    restart: always
    ports:
      - 3306:3306  
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: test
      MYSQL_USER: test
      MYSQL_PASSWORD: test
      volumes:
      #- ./dump:/docker-entrypoint-initdb.d
      - ./conf/my.cnf:/etc/mysql/my.cnf
      - ./conf/i18n:/etc/sysconfig/i18n
      #- persistent:/var/lib/mysql
      networks:
      - default

 

 

 

redis

# redis-server.yml
version: '3.7'
services:
    redis:
      image: redis:alpine
      command: redis-server --port 6379
      container_name: redis_boot
      hostname: redis_boot
      labels:
        - "name=redis"
        - "mode=standalone"
      ports:
        - 6390:6379

 

 

postgresql

      
version: '3'
services: 
  postgres
    image: postgres:9.4
    ports:
      - "5432:5432"
    volumes:
      - ~/my/data:/var/lib/postgresql/data  
    environment:
      POSTGRES_USER: test
      POSTGRES_PASSWORD: test
      POSTGRES_DB: test

'System' 카테고리의 다른 글

ubuntu python mysql dynamodb airflow postgresql redis docker yarn  (0) 2024.02.17
AWS DynamoDB 설치 사용.  (1) 2024.02.15
airflow 설치 / 설정  (0) 2024.02.06
AWS ECS (Elastic Container Service)  (0) 2024.01.24
mac os 에 python 설치  (0) 2024.01.22