version: '2'

services:
  spring-reactor-redis:
    image: sooabia/spring-reactor-redis:9
    hostname: spring-reactor-redis
    restart: always
    ports:
     - '80:8080'

  redis:
    image: redis:4.0.8-alpine
    ports:
      - "6379:6379"
    volumes:
      - /redis:/data/redis
    restart: always
    networks:
      - backend

networks:
  backend:
    driver: bridge
[root@docker-compose-vm deploy]# docker-compose -f Docker-compose.yml up -d
Creating deploy_spring-reactor-redis_1 ... done
Creating deploy_redis_1                ... done
[root@docker-compose-vm deploy]# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                    NAMES
d959b9cc196a        redis:4.0.8-alpine               "docker-entrypoint.s..."   12 seconds ago      Up 10 seconds       0.0.0.0:6379->6379/tcp   deploy_redis_1
c67cb3568cd6        sooabia/spring-reactor-redis:9   "/bin/sh -c '/usr/bi..."   12 seconds ago      Up 10 seconds       0.0.0.0:80->8080/tcp     deploy_spring-reactor-redis_1
[root@docker-compose-vm deploy]#


  • No labels
Write a comment…