Skip to content

Instantly share code, notes, and snippets.

@cnra
Created October 14, 2019 01:58
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 cnra/9ebfd5cf64a44a268b825acb03a18a80 to your computer and use it in GitHub Desktop.
Save cnra/9ebfd5cf64a44a268b825acb03a18a80 to your computer and use it in GitHub Desktop.
basic docker compose example
version: '3'
services:
web:
container_name: nginx_image
image: nginx
volumes:
- .:/usr/share/nginx/html
ports:
- '3000:80'
app:
container_name: nginx_build
restart: always
build: .
ports:
- '3002:80'
volumes:
- .:/usr/share/nginx/html
# links:
# - mongo
# mongo:
# container_name: mongo
# image: mongo
# ports:
# - '27017:27017'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment