Skip to content

Instantly share code, notes, and snippets.

@spenoir
Last active August 9, 2018 20:22
Show Gist options
  • Save spenoir/6ed2236cce32353d13796f994a4b7232 to your computer and use it in GitHub Desktop.
Save spenoir/6ed2236cce32353d13796f994a4b7232 to your computer and use it in GitHub Desktop.
docker-compose django example
db:
image: postgres:9.3
ports:
- "5432:5432"
volumes_from:
- data
environment:
- POSTGRES_DB=foo
- POSTGRES_USER
data:
image: cogniteev/echo
command: echo 'Data Container for PostgreSQL'
volumes:
- /var/lib/postgresql/data
solr:
image: solr
command: sh /docker_scripts/solr-commands.sh
volumes:
- ./foo/docker_scripts:/docker_scripts
ports:
- "8983:8983"
memcached:
image: memcached
ports:
- "11211:11211"
web:
build: .
command: sh /srv/msl/docker_scripts/web-commands.sh
volumes:
- .:/srv
ports:
- "8000:8000"
- "443"
links:
- db
- solr
- memcached
expose:
- 8000
environment:
- DJANGO_SETTINGS_MODULE=foo.settings.docker
- POSTGRES_USER
extra_hosts:
- "localhost"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment