Skip to content

Instantly share code, notes, and snippets.

@sfrancavilla
Created May 13, 2019 17:12
Show Gist options
  • Select an option

  • Save sfrancavilla/e2995d5007b0540989b0009cb2c79580 to your computer and use it in GitHub Desktop.

Select an option

Save sfrancavilla/e2995d5007b0540989b0009cb2c79580 to your computer and use it in GitHub Desktop.
Deploy Ruby on Rails apps (+ NGINX) to ECS with Docker - Medium
# 1.Specify the compose file format; we're using the last one.
# If you're curious, at https://docs.docker.com/compose/compose-file/compose-versioning/
# you can find an extensive description on the difference among versions
version: '3'
# 2.Specify the list of services that will be built. In our case, app (Ruby on Rails) and web (NGINX)
services:
app:
build:
# 2.1.Specify the root path
context: .
# 2.2.From the root path defined in context, here we define where the Dockerfile resides
dockerfile: ./docker/app/Dockerfile
web:
build:
context: .
dockerfile: ./docker/web/Dockerfile
# 2.3.Like depends_on, links expresses dependency among services. In our case, app and web
links:
- app
# 2.4.Binds port 80 for public connections
ports:
- 80:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment