Closed MaxiReglisse closed 1 year ago
I haven't tried your docker-compose, but I suspect this may be related to the fact that you have not told omeka where to look for a database (I also realised I did not include this information in the readme).
In your omekas
volume, you will have a config
folder, and inside it a database.ini
file.
Its contents should be something along the lines of:
user = "secretstring"
password = "secretpassword"
dbname = "secretstring"
host = "omekas_db"
I'll add it to the readme.
If you use this in deployment, you'll probably add to fix a few things also in the local.config.php
file.
Thank you for your reply, you're right, the omekas container didn't have the database.ini file as I had modified it in my /home.
To solve this problem, I suggest sharing the database.ini file between the host and the container. The same goes for .htaccess and local.config.php.
Here's the new version of docker-compose.yml.
version: "3.3"
volumes:
omeka_db:
omekas:
networks:
omekas-network:
driver: bridge
services:
omekas:
depends_on:
- omekas_db
image: docker.io/giocomai/omeka-s-docker:v4.0.1.development
container_name: omekas
ports:
- "8000:80"
restart: always
volumes:
- omekas:/var/www/html/volume
- ./.htaccess:/var/www/html/.htaccess
- ./database.ini:/var/www/html/volume/config/database.ini
- ./local.config.php:/var/www/html/volume/config/local.config.php
networks:
- omekas-network
omekas_db:
image: docker.io/library/mysql:5.7
container_name: omekas_db
restart: always
volumes:
- ./omekas_db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secretpassword
MYSQL_DATABASE: secretstring
MYSQL_USER: secretstring
MYSQL_PASSWORD: secretpassword
networks:
- omekas-network
Hello, I have a problem after starting the docker composition when I connect to port 80 on the host machine.
The docker composition seems to have been launched correctly
Initially, I just wanted to check that it worked with the default settings, with a network local to the host VM, and a did not want fo fix any ip address.
Here is the docker-compose.yml used:
Can you help me solve this problem? thank you in advance.
Ernest.