Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rb:docker-cheatsheet [28/01/2019 16:47]
andrew
rb:docker-cheatsheet [30/01/2019 10:03] (current)
andrew
Line 40: Line 40:
 Removing network 2ndtest_default Removing network 2ndtest_default
  
 +</​code>​
 +
 +<​code>​
 +docker-compose.yml
 +
 +version: '​3'​
 +
 +services:
 +  web:
 +    build: .
 +    image: flask_web
 +    ports:
 +     - "​5000:​5000"​
 +    links:
 +      - redis
 +    networks:
 +      - flask_app
 +    environment:​
 +      - REDIS_URL=redis://​cache
 +    restart: unless-stopped
 +
 +  redis:
 +    image: "​redis:​alpine"​
 +    container_name:​ cache
 +    networks:
 +      - flask_app
 +    restart: unless-stopped
 +
 +networks:
 +  flask_app:
 +    driver: bridge
 </​code>​ </​code>​
  

rb/docker-cheatsheet.txt ยท Last modified: 30/01/2019 10:03 by andrew