Skip to content

Docker Compose - Setup Issue - Also to share compose file.  #92

Description

@fsejoseph

I am using Docker EE 18.09.2, UCP 3.1.2, and DTR 2.6.1 with Layer 7 enabled. Main issue is when i restart a container JIRA restarts all together. It goes back to setup page. Why?
Here is my compose file

version: '3.3'
services:
    nginx:
        image: nginx:alpine
        deploy:
            mode: replicated
            labels:
                #Change docker collection group if needed. Example: /Shared/<collection group>
                com.docker.ucp.access.label: /Shared/JIRA
                #Change the URL to your URL
                com.docker.lb.hosts: jira.com
                com.docker.lb.network: jira-layer
                com.docker.lb.port: 443
                com.docker.lb.ssl_passthrough: "true"
        secrets:
            - jira-site.conf
            - card.crt
            - card.key
            - ca.pem
            - card.pem
        command: sh -c "cp -f /run/secrets/jira-site.conf /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
        networks:
            - jira-layer
            - jira-network
    jira:
        image: cptactionhank/atlassian-jira-software:latest 
        deploy:
            labels:
                com.docker.ucp.access.label: /Shared/JIRA
        volumes:
            - jiradata:/var/atlassian/jira
        environment:
            - 'JIRA_DATABASE_URL=postgresql://jira@postgresql/jiradb'
            - 'JIRA_DB_PASSWORD=password'
            #- 'JIRA_PROXY_NAME=http://proxy.com/'
            #- 'JIRA_PROXY_PORT=80'
            #- 'JIRA_PROXY_SCHEME=http'
            - 'X_PROXY_NAME=http://proxy.com/'
            - 'X_PROXY_PORT=80'
            - 'X_PROXY_SCHEME=http'
        secrets:
            - ca.pem        
        networks:
            - jira-network
    postgresql:
        image: postgres:11.2
        deploy:
            labels:
                com.docker.ucp.access.label: /Shared/JIRA        
        volumes:
            - postgresqldata:/var/lib/postgresql/data
        environment:
            - 'POSTGRES_USER=jira'
        # CHANGE THE PASSWORD!
            - 'POSTGRES_PASSWORD=password'
            - 'POSTGRES_DB=jiradb'
            - 'POSTGRES_ENCODING=UNICODE'
            - 'POSTGRES_COLLATE=C'
            - 'POSTGRES_COLLATE_TYPE=C'
        networks:
            - jira-network
networks:
    jira-layer:
     external: true
    jira-network:
     external: true
volumes:
  jiradata:
    external: true
  postgresqldata:
    external: true
secrets:
  jira-site.conf:
    external: true
  card.crt:
    external: true
  card.key:
    external: true
  card.pem:
    external: true
  ca.pem:
    external: true

When build the stack it works. All services come up and work. When I try to setup the database the site goes offline and when it comes back online it tells me my database is not emptied which it is a new database. When I first put the info it works, I press test connection it says test connection good. What could be the problem. I do see the mysql and postgresql is in the Dockerfile. Should I take those out?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions