Created
March 19, 2020 08:08
-
-
Save wcaquino/9fc22b72a75754f1434504fa8b908114 to your computer and use it in GitHub Desktop.
Docker compose para a aplicação tasks
This file contains hidden or 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: "3" | |
services: | |
db: | |
container_name: pg-prod | |
image: postgres:9.6 | |
networks: | |
- prod_net_back | |
environment: | |
- POSTGRES_PASSWORD=passwd | |
- POSTGRES_DB=tasks | |
volumes: | |
- prod_postgresql:/var/lib/postgresql | |
- prod_postgresql_data:/var/lib/postgresql/data | |
backend: | |
container_name: backend-prod | |
image: back_prod:build_${BUILD_NUMBER} | |
build: | |
context: . | |
args: | |
- WAR_FILE=target/tasks-backend.war | |
- CONTEXT=tasks-backend | |
networks: | |
- prod_net_back | |
- prod_net_front | |
#ports: | |
# - 9998:8080 | |
environment: | |
- DATABASE_HOST=db | |
- DATABASE_PORT=5432 | |
- DATABASE_USER=postgres | |
- DATABASE_PASSWD=passwd | |
#- DATABASE_UPDATE=none | |
depends_on: | |
- db | |
frontend: | |
container_name: frontend-prod | |
image: front_prod:build_${BUILD_NUMBER} | |
build: | |
context: . | |
args: | |
- WAR_FILE=tasks-frontend/target/tasks.war | |
- CONTEXT=tasks | |
networks: | |
- prod_net_front | |
ports: | |
- 9999:8080 | |
environment: | |
- BACKEND_HOST=backend | |
- BACKEND_PORT=8080 | |
- APP_VERSION=build_${BUILD_NUMBER} | |
#depends_on: | |
# - backend | |
networks: | |
prod_net_front: | |
prod_net_back: | |
volumes: | |
prod_postgresql: | |
prod_postgresql_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment