|
version: '3.5' |
|
|
|
networks: |
|
prts: |
|
name: prts |
|
driver: bridge |
|
|
|
volumes: |
|
postgres: |
|
external: |
|
name: printerous_postgres |
|
mysql: |
|
external: |
|
name: printerous_mysql |
|
|
|
services: |
|
# ========================Application============================ |
|
platform: |
|
container_name: platform |
|
build: |
|
context: ./partner-platform |
|
dockerfile: ./Dockerfile.dev |
|
command: bin/rails s -p 3000 -b '0.0.0.0' |
|
stdin_open: true |
|
tty: true |
|
volumes: |
|
- ./partner-platform:/app |
|
- $SSH_AUTH_SOCK:$SSH_AUTH_SOCK |
|
environment: |
|
SSH_AUTH_SOCK: $SSH_AUTH_SOCK |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
ports: |
|
- "3000:3000" |
|
depends_on: |
|
- postgres |
|
- mongo |
|
- mysql |
|
- redis |
|
- platform-sidekiq |
|
|
|
platform-sidekiq: |
|
container_name: platform-sidekiq |
|
build: |
|
context: ./partner-platform |
|
dockerfile: ./Dockerfile.dev |
|
volumes: |
|
- ./partner-platform:/app |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
links: |
|
- postgres |
|
- redis |
|
command: bundle exec sidekiq |
|
|
|
website: |
|
container_name: website |
|
build: |
|
context: ./website |
|
dockerfile: ./Dockerfile.dev |
|
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" |
|
networks: |
|
- prts |
|
stdin_open: true |
|
tty: true |
|
restart: unless-stopped |
|
volumes: |
|
- ./website:/app |
|
- $SSH_AUTH_SOCK:$SSH_AUTH_SOCK |
|
environment: |
|
SSH_AUTH_SOCK: $SSH_AUTH_SOCK |
|
ports: |
|
- "3005:3000" |
|
depends_on: |
|
- postgres |
|
- mysql |
|
- redis |
|
- website-sidekiq |
|
- payment |
|
- shipping |
|
|
|
website-sidekiq: |
|
container_name: website-sidekiq |
|
build: |
|
context: ./website |
|
dockerfile: ./Dockerfile.dev |
|
volumes: |
|
- ./website:/app |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
depends_on: |
|
- postgres |
|
- redis |
|
command: bundle exec sidekiq |
|
|
|
payment: |
|
container_name: payment |
|
image: printerous/service-payment |
|
restart: unless-stopped |
|
stdin_open: true |
|
tty: true |
|
networks: |
|
- prts |
|
ports: |
|
- "3007:3000" |
|
depends_on: |
|
- postgres |
|
- redis |
|
- payment-sidekiq |
|
environment: |
|
XENDIT_SECRET: '' |
|
XENDIT_PUBLIC: '' |
|
XENDIT_VERIFY: '' |
|
XENDIT_API_URL: https://api.xendit.co |
|
MIDTRANS_URL: https://app.sandbox.midtrans.com |
|
MIDTRANS_API_URL: https://api.sandbox.midtrans.com |
|
MIDTRANS_MERCHANT_ID: '' |
|
MIDTRANS_CLIENT_KEY: '' |
|
MIDTRANS_SERVER_KEY: '' |
|
MIDTRANS_ENABLED_PAYMENTS: credit_card,gopay |
|
PRINTEROUS_URL: 'http://website:3000' |
|
PRTS_SIGNATURE_KEY: 'SOME_RANDOM_STRING' |
|
PG_HOST: postgres |
|
PG_PORT: 5432 |
|
PG_USERNAME: postgres |
|
PG_PASSWORD: |
|
PG_DATABASE: payment_development |
|
PG_DATABASE_TEST: payment_test |
|
REDIS_HOST: redis |
|
REDIS_PORT: 6379 |
|
REDIS_DATABASE: '/2' |
|
|
|
payment-sidekiq: |
|
image: printerous/service-payment |
|
container_name: payment-sidekiq |
|
command: bash -c "bundle exec sidekiq" |
|
restart: unless-stopped |
|
networks: |
|
- prts |
|
depends_on: |
|
- redis |
|
environment: |
|
REDIS_HOST: redis |
|
REDIS_PORT: 6379 |
|
REDIS_DATABASE: '/2' |
|
|
|
shipping: |
|
container_name: shipping |
|
image: printerous/service-shipping |
|
stdin_open: true |
|
tty: true |
|
restart: unless-stopped |
|
networks: |
|
- prts |
|
ports: |
|
- "3006:3000" |
|
depends_on: |
|
- postgres |
|
- mysql |
|
- redis |
|
- shipping-sidekiq |
|
environment: |
|
PG_HOST: postgres |
|
PG_PORT: 5432 |
|
PG_USERNAME: postgres |
|
PG_PASSWORD: |
|
PG_DATABASE: prts-shipping |
|
PG_DATABASE_TEST: shipping_test |
|
PRISM_HOST: postgres |
|
PRISM_PORT: 5432 |
|
PRISM_USERNAME: postgres |
|
PRISM_PASSWORD: |
|
PRISM_DB_NAME: prtsv4 |
|
PRISM_DB_NAME_TEST: prts-partner_test |
|
|
|
V3_DBHOST: mysql |
|
V3_DBPORT: 3306 |
|
V3_DBUSER: root |
|
V3_DBPASS: |
|
V3_DBNAME: v3-lite |
|
V3_DBNAME_TEST: v3-lite-test |
|
|
|
DELIVEREE_API_KEY: '' |
|
DELIVEREE_URI: https://api.sandbox.deliveree.com/public_api/v1 |
|
SICEPAT_URI: http://api.sicepat.com/customer |
|
SICEPAT_API_KEY: '' |
|
|
|
LALAMOVE_SECRET: '' |
|
LALAMOVE_KEY: '' |
|
LALAMOVE_BASEURL: https://sandbox-rest.lalamove.com |
|
|
|
REDIS_HOST: redis |
|
REDIS_PORT: 6379 |
|
REDIS_DATABASE: /3 |
|
|
|
shipping-sidekiq: |
|
container_name: shipping-sidekiq |
|
image: printerous/service-shipping |
|
command: bash -c "bundle exec sidekiq" |
|
restart: unless-stopped |
|
networks: |
|
- prts |
|
depends_on: |
|
- postgres |
|
- redis |
|
environment: |
|
REDIS_HOST: redis |
|
REDIS_PORT: 6379 |
|
REDIS_DATABASE: /3 |
|
|
|
friday: |
|
container_name: friday |
|
image: printerous/friday |
|
stdin_open: true |
|
tty: true |
|
restart: unless-stopped |
|
networks: |
|
- prts |
|
ports: |
|
- "3008:3000" |
|
depends_on: |
|
- redis |
|
environment: |
|
REDIS_HOST: redis |
|
REDIS_PORT: 6379 |
|
REDIS_DATABASE: /4 |
|
|
|
# ==========================Resource=============================== |
|
|
|
postgres: |
|
image: postgres:9.6 |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
volumes: |
|
- postgres:/var/lib/postgresql/data |
|
healthcheck: |
|
test: ["CMD", "pg_isready", "-U", "postgres"] |
|
interval: 10s |
|
timeout: 5s |
|
retries: 3 |
|
|
|
mongo: |
|
container_name: mongo |
|
image: mongo |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
|
|
mysql: |
|
image: mysql:5.7 |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
environment: |
|
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' |
|
volumes: |
|
- mysql:/var/lib/mysql |
|
healthcheck: |
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] |
|
timeout: 20s |
|
retries: 10 |
|
|
|
redis: |
|
container_name: redis |
|
image: redis |
|
networks: |
|
- prts |
|
restart: unless-stopped |
|
healthcheck: |
|
test: ["CMD", "redis-cli", "ping"] |
|
interval: 10s |
|
timeout: 5s |
|
retries: 3 |
|
|
|
# ==========================Third Party=============================== |