Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker stack help #1299

Closed
vidhya199 opened this issue Aug 8, 2021 · 3 comments
Closed

docker stack help #1299

vidhya199 opened this issue Aug 8, 2021 · 3 comments

Comments

@vidhya199
Copy link

vidhya199 commented Aug 8, 2021

Working with docker stack i have docker stack as below its not working pales suggest me changes .. i dont want a bind because its generate unnamed volumes.

version: '3.4'

volumes:
   nfsdata:
      driver: local
      driver_opts:
        type: "nfs"
        o: "addr=192.168.0.140,rw,nfsvers=4,async"
        device: ":/mnt/data/volumes/nginx-proxy-manager/data"
        
   nfsletsencrypt:
      driver: local
      driver_opts:
        type: "nfs"
        o: "addr=192.168.0.140,rw,nfsvers=4,async"
        device: ":/mnt/data/volumes/nginx-proxy-manager/letsencrypt"
        
   nfsmysql:
      driver: local
      driver_opts:
        type: "nfs"
        o: "addr=192.168.0.140,rw,nfsvers=4,async"
        device: ":/mnt/data/volumes/nginx-proxy-manager/mysql"
     
networks:
  nginx_network:
    driver: overlay
    attachable: true

services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
    volumes:
      - nfsdata:/data
      - nfsmysql:/data/mysql
      - nfsletsencrypt:/etc/letsencrypt
    networks:
      - nginx_network
  db:
    image: 'jc21/mariadb-aria:10.4'
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - nfsmysql:/var/lib/mysql
    networks:
      - nginx_network
@vidhya199 vidhya199 added the bug label Aug 8, 2021
@chaptergy chaptergy changed the title Working with docker stack i have docker stack as below its not working pales suggest me changes .. i dont want a bind because its generate unnamed volumes. docker stack help Aug 8, 2021
@chaptergy
Copy link
Collaborator

Unfortunately this is not the place for this question, as issues are for bugs and feature requests. Please see how to get support. But as this has nothing to do with npm and is just a docker-compose thing, other communities will most likely be more helpful to you than this one.

@vidhya199
Copy link
Author

vidhya199 commented Aug 8, 2021

NO worries.. got the solution ... check this out... will help other people.. and my suggetion to you please make document on this ... how to dpeloy with docker stack ... add below code on your website... will help a lot off people who is looking for docker stack with nfs....its work for me....

version: '3.4'

volumes:
   nfsdata:
      driver: local
      driver_opts:
        type: "nfs"
        o: "addr=192.168.0.140,rw,nfsvers=4,async"
        device: ":/mnt/data/volumes/nginx-proxy-manager/data"
        
   nfsletsencrypt:
      driver: local
      driver_opts:
        type: "nfs"
        o: "addr=192.168.0.140,rw,nfsvers=4,async"
        device: ":/mnt/data/volumes/nginx-proxy-manager/letsencrypt"
     
networks:
  nginx_network:
    driver: overlay
    attachable: true

services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
    volumes:
      - nfsdata:/data
      - nfsletsencrypt:/etc/letsencrypt
    networks:
      - nginx_network
  db:
    image: 'jc21/mariadb-aria:10.4'
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - /mnt/data/volumes/nginx-proxy-manager/data/mysql:/var/lib/mysql
    networks:
      - nginx_network

@vidhya199
Copy link
Author

i just add below line .. instead of named volume. in db service..

  • /mnt/data/volumes/nginx-proxy-manager/data/mysql:/var/lib/mysql

@NginxProxyManager NginxProxyManager locked and limited conversation to collaborators Aug 8, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants