Created
November 24, 2017 14:21
-
-
Save zedtux/504d853297cf185108dd0e595910ed01 to your computer and use it in GitHub Desktop.
Docker compose file with a data container for the Elixir/Phoenix "deps" folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
# Application database | |
db: | |
image: postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./db:/var/lib/postgresql | |
# Dependencies caching | |
app_deps: | |
image: <name of your image here> | |
command: echo Mix data container | |
volumes: | |
- /deps | |
# Elixir Phoenix application | |
app: | |
build: . | |
command: mix phx.server | |
environment: | |
- PORT=4000 | |
- PG_HOST=db | |
- PG_USERNAME=postgres | |
ports: | |
- 4000:4000 | |
links: | |
- db | |
volumes_from: | |
- app_deps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment