Add command to docker compose for the chown issue in Mysql #3959
Unanswered
samuellhwarren
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I love the NPM app, the only problem is everytime my package restarts, I have to go into the mysql app through Docker Exec and do a "chown -R mysql:mysql npm" to solve a recurring ownership issue.
I was wondering if there's a way to add that into my docker compose file or some set upgrade or command I can do to fix that issue?
Here's a sample of the compose file I used, of course some of the data is redacted.::
``version: "2"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "some npm password"
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'yobasystems/alpine-mariadb:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'some mysql password'
MARIADB_AUTO_UPGRADE: '1'
volumes:
- ./data/mysql:/var/lib/mysql
``
Beta Was this translation helpful? Give feedback.
All reactions