Open mrWheel opened 9 months ago
- In Docker Desktop go to
Resources
->File Sharing
- Mount the
db
,public_media
anduploads
folders, located in the same directory where thedocker-compose.yaml
file is located.
You should not need to do this steps when using a docker-compose file. These mapping should be done automatically, when running docker-compose up
.
I would expect, that defining these manually before running docker-compose, messes up the real mapping process.
So you should try to just run docker-compose up
in a fresh folder with the docker-compose.yaml
file.
The folders and volume mappings should get created automatically.
@jbtronics, Jan,
Thanks for your reply!
I removed the bindings from Resources
-> File Sharing
If I run docker-composer up -d
I get this messages:
% docker-compose up -d
[+] Building 0.0s (0/0) docker:desktop-linux
[+] Running 0/0
⠋ Container partdb Starting 0.0s
Error response from daemon: Mounts denied:
The path /Users/x/myDockerfiles/Part-DB-symfony-master2/db is not shared from the host and is not known to
Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/desktop/mac for more info.
This is my docker-compose.yaml file:
version: '3.3'
services:
partdb:
#user: "root"
container_name: partdb
# By default Part-DB will be running under Port 8080, you can change it here
ports:
- '8080:80'
volumes:
# By default
- ./db:/var/www/html/var/db
- ./uploads:/var/www/html/uploads
- ./public_media:/var/www/html/uploads/media
restart: unless-stopped
image: jbtronics/part-db1:latest
environment:
# Put SQLite database in our mapped folder. You can configure some other kind of database here too.
- DATABASE_URL=sqlite:///%kernel.project_dir%/var/db/app.db
# In docker env logs will be redirected to stderr
- APP_ENV=docker
# You can configure Part-DB using environment variables
# Below you can find the most essential ones predefined
# However you can add add any other environment configuration you want here
# See .env file for all available options or https://docs.part-db.de/configuration.html
# The language to use serverwide as default (en, de, ru, etc.)
- DEFAULT_LANG=en
# The default timezone to use serverwide (e.g. Europe/Berlin)
- DEFAULT_TIMEZONE=Europe/Berlin
# The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
- BASE_CURRENCY=EUR
# The name of this installation. This will be shown as title in the browser and in the header of the website
- INSTANCE_NAME=Part-DB
# Allow users to download attachments to the server by providing an URL
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
- ALLOW_ATTACHMENT_DOWNLOADS=0
# Use gravatars for user avatars, when user has no own avatar defined
- USE_GRAVATAR=0
# Override value if you want to show to show a given text on homepage.
# When this is empty the content of config/banner.md is used as banner
- BANNER=Parts Database system van Willem Aandewiel<br>Build with docker-compose.yaml
Describe the bug I followed the instructions for using the docker image but it seems the "Volumes" are not correct connected.
To Reproduce Steps to reproduce the behavior:
docker-compose.yaml
as in this document exampleResources
->File Sharing
db
,public_media
anduploads
folders, located in the same directory where thedocker-compose.yaml
file is located.docker-compose up --build
output:docker exec --user=www-data partdb php bin/console doctrine:migrations:migrate
http://localhost:8080
Expected behavior Part-DB page starts -> OK Expect
app.db
in./db
--> it is not!!! There is noapp.db
anywhere on my iMac!Screenshots
Server Side
Desktop:
Additional context I have had a working Part-DB (I created it long ago with the provided
Dockerfile
, but that does not work anymore complaining aboutsymfony.conf
not found) in Docker but suddenly Docker would not startup anymore. So I followed these instructions.Probably steps 3, 4, and 5 removed my working Part-DB container!!! Luckily I still have the
app.db
so I hope to restore my data.