Last active
May 6, 2018 20:24
-
-
Save janoulle/d6694b5e55aeffcb37875f936f5f7911 to your computer and use it in GitHub Desktop.
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
sample docker-compose file | |
# Use postgres/example user/password credentials | |
version: '3.1' | |
networks: | |
myapp-network: | |
services: | |
#https://hub.docker.com/_/postgres/ | |
myapp-db: | |
image: postgres:latest | |
container_name: myapp-db | |
env_file: | |
- ../../Docker/myapp/environmentvariables-db.env | |
ports: | |
- "5433:5432" | |
expose: | |
- "5432" # signifies intent to expose the port for inter-docker container comms | |
networks: | |
- myapp-network | |
myapp-server: | |
image: dockerhubusername/reponame:version | |
container_name: myapp-server | |
ports: | |
- "8080:8080" | |
- "8000:8000" | |
depends_on: | |
- myapp-db | |
links: | |
- myapp-db | |
expose: | |
- "8080" | |
- "8000" | |
volumes: | |
- ../../Docker/myapp/logs/:/usr/local/tomcat/logs | |
- ../../Docker/myapp/downloads/webpages:/usr/local/tomcat/downloads/webpages | |
env_file: | |
- ../../Docker/myapp/environmentvariables-server.env | |
environment: | |
- CATALINA_HOME=/usr/local/tomcat | |
- SPRING_PROFILES_ACTIVE=postgresql | |
networks: | |
- restaurantscores-network |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment