Last active
January 10, 2019 13:55
-
-
Save phouverneyuff/14270166f5fdad5d0708dbb276505a58 to your computer and use it in GitHub Desktop.
Docker compose para subir todos as imagens docker para a avaliação
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.1' | |
services: | |
mongodb: | |
image: mongo:latest | |
container_name: "mongodb" | |
environment: | |
- MONGO_DATA_DIR=/data/db | |
- MONGO_LOG_DIR=/dev/null | |
- MONGODB_APPLICATION_DATABASE=twitties | |
volumes: | |
- ./mongo-data/db:/data/db | |
ports: | |
- 27017:27017 | |
command: mongod --smallfiles --logpath=/dev/null # --quiet | |
app-collector: | |
image: phob/collection-twitties:latest | |
restart: always | |
ports: | |
- 9080:8080 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"] | |
interval: 4s | |
timeout: 3s | |
retries: 3 | |
environment: | |
- SPRING_DATA_MONGODB_URI=mongodb://mongodb:27017/twitties | |
depends_on: | |
- mongodb | |
links: | |
- mongodb | |
app-twitties-country: | |
image: phob/twitties-country:latest | |
restart: always | |
ports: | |
- 9081:8080 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"] | |
interval: 4s | |
timeout: 3s | |
retries: 3 | |
environment: | |
- SPRING_DATA_MONGODB_URI=mongodb://mongodb:27017/twitties | |
depends_on: | |
- mongodb | |
links: | |
- mongodb | |
postgres-kong: | |
image: postgres:9.5 | |
environment: | |
POSTGRES_DB: ${KONG_PG_DATABASE:-kong} | |
POSTGRES_PASSWORD: ${KONG_PG_PASSWORD:-kong} | |
POSTGRES_USER: ${KONG_PG_USER:-kong} | |
healthcheck: | |
test: ["CMD", "pg_isready", "-U", "${KONG_PG_USER:-kong}"] | |
interval: 30s | |
timeout: 30s | |
retries: 3 | |
ports: | |
- 5433:5432 | |
volumes: | |
- ./postgres-kong-data/data:/var/lib/postgresql/data | |
restart: on-failure | |
stdin_open: true | |
tty: true | |
kong-migrations: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
command: kong migrations up | |
depends_on: | |
postgres-kong: | |
condition: service_healthy | |
environment: | |
KONG_DATABASE: postgres | |
KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong} | |
KONG_PG_HOST: db | |
KONG_PG_PASSWORD: ${KONG_PG_PASSWORD:-kong} | |
KONG_PG_USER: ${KONG_PG_USER:-kong} | |
links: | |
- postgres-kong:db | |
kong: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
depends_on: | |
postgres-kong: | |
condition: service_healthy | |
kong-migrations: | |
condition: service_started | |
environment: | |
KONG_ADMIN_ACCESS_LOG: /dev/stdout | |
KONG_ADMIN_ERROR_LOG: /dev/stderr | |
KONG_ADMIN_LISTEN: '0.0.0.0:8001' | |
KONG_CASSANDRA_CONTACT_POINTS: db | |
KONG_DATABASE: postgres | |
KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong} | |
KONG_PG_HOST: db | |
KONG_PG_PASSWORD: ${KONG_PG_PASSWORD:-kong} | |
KONG_PG_USER: ${KONG_PG_USER:-kong} | |
KONG_PROXY_ACCESS_LOG: /dev/stdout | |
KONG_PROXY_ERROR_LOG: /dev/stderr | |
links: | |
- postgres-kong:db | |
- app-collector:app-collector | |
- app-twitties-country:app-twitties-country | |
ports: | |
- "8000:8000/tcp" | |
- "8001:8001/tcp" | |
- "8443:8443/tcp" | |
- "8444:8444/tcp" | |
restart: on-failure | |
postgres-konga: | |
image: postgres:9.5 | |
environment: | |
POSTGRES_DB: "konga" | |
POSTGRES_USER: "konga" | |
POSTGRES_PASSWORD: "9832kjsfd" | |
healthcheck: | |
test: ["CMD", "pg_isready", "-U", "konga"] | |
interval: 30s | |
timeout: 30s | |
retries: 3 | |
ports: | |
- 5432:5432 | |
volumes: | |
- ./postgres-konga-data/data:/var/lib/postgresql/data | |
restart: on-failure | |
stdin_open: true | |
tty: true | |
konga: | |
image: pantsel/konga | |
depends_on: | |
postgres-konga: | |
condition: service_healthy | |
links: | |
- postgres-konga:db | |
- kong:kong | |
environment: | |
TOKEN_SECRET: skjdfkshdfkjsn23498 | |
DB_ADAPTER: postgres | |
DB_HOST: db | |
DB_PORT: 5432 | |
DB_USER: "konga" | |
DB_PASSWORD: "9832kjsfd" | |
DB_DATABASE: "konga" | |
# NODE_ENV: production | |
ports: | |
- 1337:1337 | |
# healthcheck: | |
# test: ["CMD-SHELL", "curl -f http://localhost:1337/ || exit 1"] | |
# interval: 4s | |
# timeout: 3s | |
# retries: 3 | |
nginx: | |
image: phob/nginx-twitter:latest | |
restart: always | |
ports: | |
- 80:80 | |
depends_on: | |
- kong | |
links: | |
- kong:gateway | |
command: nginx -g 'daemon off'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment