Skip to content
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

wrong permissions within container for web-site files #98

Open
karakuraizer opened this issue Oct 11, 2023 · 0 comments
Open

wrong permissions within container for web-site files #98

karakuraizer opened this issue Oct 11, 2023 · 0 comments

Comments

@karakuraizer
Copy link

docker-compose.yml


services:
  db:
    image: mysql/mysql-server:5.7
    restart: on-failure
    hostname: db
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /usr/share/zoneinfo:/usr/share/zoneinfo:ro
      - $PWD/mysql:/var/lib/mysql
      - $PWD/conf/mysql/:/etc/mysql/
#      - $PWD/log:/var/log
    environment:
     - MYSQL_USER=zmuser
     - MYSQL_PASSWORD=123123
     - MYSQL_DATABASE=zm
     - MYSQL_ROOT_PASSWORD=123123
     - MYSQL_ROOT_HOST=%
  web:
    image: zoneminderhq/zoneminder:latest-ubuntu18.04
    mem_limit: 14gb
    #shm_size: 1024M
    #memswap_limit: 4gb
    oom_kill_disable: true
    restart: on-failure
##    entrypoint: ["sleep","1d"]
    command: ["chown -R www-data:www-data /usr/share/zoneminder/www"]
    ports:
      - 8080:80
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $PWD/log:/var/log/zm
      - $PWD/backups:/var/backups
      - $PWD/zoneminder:/var/cache/zoneminder
      - $PWD/zoneminder/cache:/usr/share/zoneminder/www/cache
      - $PWD/motionstream:/etc/service/motionstream
      - $PWD/ssmtp:/etc/ssmtp
      - type: tmpfs
        target: /dev/shm
    environment:
        #- SERVICE_PORTS="80"
      - ZM_DB_HOST=db
      - ZM_DB_NAME=zm
      - ZM_DB_USER=zmuser
      - ZM_DB_PASS=123123
    depends_on:
      - db

FIXed issue with docker exec :
chown -R www-data:www-data /usr/share/zoneminder/www

OR in compose file:

command: ["chown -R www-data:www-data /usr/share/zoneminder/www"]

also got an issue with running startup script for db (creating tables etc...) forgot how resolved it...guess the same way like docker exec -it zm_db_1 ... and run initial sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant