Skip to content

Instantly share code, notes, and snippets.

@apzentral
Last active April 1, 2021 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apzentral/19969b954a2d514efb691daaf000fc06 to your computer and use it in GitHub Desktop.
Save apzentral/19969b954a2d514efb691daaf000fc06 to your computer and use it in GitHub Desktop.
Example: docker-compose.yml file
version: "3.8"
services:
demo-service:
build:
context: .
dockerfile: Dockerfile
restart: "no"
image: demo-image:2.4
ports:
- "8080:8080"
depends_on:
- another-service
links:
- another-service
volumes:
- data-demo-service:/tmp/demo
- ./folder:/tmp/folder
networks:
demo_network:
environment:
DEMO_SERVICE: "true"
networks:
demo_network:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
- subnet: "2001:3984:3989::/64"
volumes:
data-demo-service:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment