Hyper-v issue docker-compose

Aileen Tan June 29, 2020

HI

started up the docker containers using the command "docker-compose start". After 10 min , the memory demand of VM in Hyper-v exceeded the assigned 8GB as shown below. The VM (ubuntun 18.04.2) started to have slow response even when the cpu usage is almost 0%.

MemDemand_issue.JPG

Have prune the docker container, volumes and networks to remove unused components.
It still having the slow response due high memory usage.

Include the docker-compose file handover by predecessor.
Kindly advise any issue with the docker-compose file and how to reduce the memory utilization in hyper-v thanks

version: '3.5'

services:
test-git-postgresql:
container_name: test-git-postgresql
image: postgres:9.6
restart: always
ports:
- 5431:5431
volumes:
- test-git-postgresql-vol:/var/lib/postgresql/data
command: -p 5431
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

bitbucket:
container_name: test-bitbucket
restart: unless-stopped
depends_on:
- test-git-postgresql
image: atlassian/bitbucket-server:latest
volumes:
- test-bitbucket-vol:/var/atlassian/application-data/bitbucket
ports:
- '8090:7990'
- '8099:7999'
environment:
- 'VIRTUAL_HOST=test-git'

volumes:
test-bitbucket-vol:
external: true
test-git-postgresql-vol:
external: true

networks:
default:
external:
name: jiranet
--------------
version: '3.5'

services:
test-jira:
container_name: test-jira
restart: always

depends_on:
- test-postgresql
image: cptactionhank/atlassian-jira-software
#image: atlassian-jira:8.2.3
volumes:
- test-jira-vol:/var/atlassian/jira
- test-jira-vol:/opt/atlassian/jira/logs
ports:
- '8080:8080'
environment:
- 'JIRA_DATABASE_URL=postgresql://projectadmin@test-postgresql/jira'

logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

test-postgresql:
container_name: test-postgresql
image: postgres:9.6

restart: always
ports:
- 5430:5430

volumes:
- test-postgres-vol:/var/lib/postgresql/data
command: -p 5430
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

volumes:
test-jira-vol:
external: true

test-postgres-vol:
external: true
networks:
default:
external:
name: jiranet

 

1 answer

0 votes
Bloompeak Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 30, 2020

Hi @Aileen Tan ,

It might be normal that the docker uses 8GB of memory. Because you are running 4 containers,

  1. Jira
  2. Bitbucket
  3. 2 Postgresql

Removing 1 postgresql might reduce the memory usage. You can create 2 different databases 1 for jira,1 for bitbucket inside the single postgresql docker container and refer these database names from bitbucket and jira respectively.

Aileen Tan June 30, 2020

noted on the suggestion. 

 

Bitbucket and confluence will need to connect to postgress sql on specific port 5431 and 5433 respectively . 

How  do I configure the docker-compose file to have 2 postgress port ?

kindly advise as I am new to docker container thanks alot

Aileen Tan June 30, 2020

to add on to the suggestion of  creating 2 PostgreSQL (bitbucket 5431, confluence -5433) instance in 1 single PostgreSQL container

At the final stage,  we need to create application link back to jira on different port for 3 products.

  1. Jira :http://<project name>-jira:8080
  2. Confluence : http://<project name>-jira:8088
  3. Bitbukett: http://<project name>-jira:8090

Kindly advise do I configure the docker-compose file to have 2 PostgreSQL port in a single PostgreSQL container

Suggest an answer

Log in or Sign up to answer