Replies: 6 comments 3 replies
-
Hello and thanks for the question ! I'll update the README to try and make it clearer. The important part was:
Docker is a platform that allows deploying applications in a containerized environment. Docker containers are isolated from the host system, which makes them unable to access files on your machine by default. The container has a completely different file system with their own folder structure. Each folder you want to give access to has to be specified on the command line with the following syntax: For more security, SQLPage's container by default expects your website's files to be in In your case, the Regarding your question about the docker run -it --name sqlpage -p 8080:8080 --volume "$(pwd):/var/www" --volume "$(pwd)/sqlpage:/etc/sqlpage:ro" --rm lovasoa/sqlpage This command will mount the An even more secure setup would be to create separate folders for the files you serve and for the configuration. You can create docker run -it --name sqlpage -p 8080:8080 --volume "/home/me/mysite/src:/var/www" --volume "/home/me/mysite/configuration:/etc/sqlpage:ro" --rm lovasoa/sqlpage This will work whatever directory you launch the command from, since it does not use |
Beta Was this translation helpful? Give feedback.
-
well, after some months, i'm back with docker, rasberry pi and sqlpage, and an sqlite database I succeeded in making sqlpage work in the pi. I can access it, evything seems ok. I tried to write a dockerfile based on sqlpage like this :
First, i'm really not sure of the CMD, So i copied mod_spatialite.so from my pi to the container, in /usr/lib. I'm really not sure of the results (it was late when i stopped...). Could you guide me ? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. I didn't red all the readme about docker. Sorry for
that.
Le ven. 29 nov. 2024 à 17:26, Ophir LOJKINE ***@***.***> a
écrit :
… The sqlpage image is optimized for size, and does not contain a full
debian distribution with apt and other tools.
What you can do is follow these instructions from the readme:
https://github.com/sqlpage/SQLPage?tab=readme-ov-file#with-docker .
FROM debian:stable-slim
COPY --from=lovasoa/sqlpage:main /usr/local/bin/sqlpage /usr/local/bin/sqlpage
# install mod_spatialiteRUN apt-get update && apt-get install -y \
libsqlite3-mod-spatialite \
&& rm -rf /var/lib/apt/lists/*
—
Reply to this email directly, view it on GitHub
<#212 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOYEXYZCLOOPOWRMWW3KU532DCIRTAVCNFSM6AAAAABSWWOLZWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNBRG42DSNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
------------------------------------------------------
*Florent Mercey *
*- Responsable d'opération Protohistoire, Etudes céramique
Bronze/Hallstattt*
*- Référent SIG, Référent NAS, collectif ramen ***@***.***>
(Recherches Archéologiques en Modélisation de l'Enregistrement Numérique)*
Inrap - Orléans
525 avenue de la Pomme de Pin
45590 Saint Cyr en Val
tel : 02 38 69 96 58 ; port : 06 08 90 00 62
http://www.inrap.fr
|
Beta Was this translation helpful? Give feedback.
-
well, i really don't understand how to configure sqlpage in docker. First, i did this to create a new image, as you said above. I add the CMD line, but i'm not sure it's necessary
then, i created in my Documents folder a folder Sqlpage. Inside i have my sql pages (index.sql, etc..), my database, and in a subfolder named sqlpage my json file. For the moment, it's this :
i launch my docker from my documents/sqlpage folder with this :
response is : and no access to my index.sql and to the database. Thanks for your answer |
Beta Was this translation helpful? Give feedback.
-
Ok, so you mean, i create a dockerfile like this :
no need of the configuration directory ?
Thanks |
Beta Was this translation helpful? Give feedback.
-
ah yes, thanks for the example. well. I create a docker file : FROM debian:stable-slim
COPY --from=lovasoa/sqlpage:latest /usr/local/bin/sqlpage /usr/local/bin/sqlpage
# install mod_spatialite
RUN apt-get update && apt-get install -y \
libsqlite3-mod-spatialite \
&& rm -rf /var/lib/apt/lists/*
ENV SQLPAGE_WEB_ROOT=/var/www
CMD ["/usr/local/bin/sqlpage"] and i build it. In /home/me/documents/mywebsite/sqlpage/, my json should be : {
"database_url": "sqlite:///my_database.db"
"sqlite_extensions": ["mod_spatialite"]
} my docker command, launched from /home/me/documents/mywebsite/ will be : docker run -it --name sqlpage -p 8080:8080 --volume "$(pwd):/var/www" --rm sqlpage_spatialite |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'm really new using docker, and i just succeeded in installing it and launching sqlpage with this command :
sudo docker run -it --name sqlpage -p 8080:8080 --volume "$(pwd):/var/www" --rm lovasoa/sqlpage
But, it's still a bit weird to me. I understood that (i think), even if you launch sqlpage from docker, the place you launch it from, eg
/home/me/sqlpage
, is important and that yourindex.sql
file for example has to be put in this directory, ie/home/me/sqlpage
.But , i don't understand how to configure and where to place the sqlpage.json. It's not seen by sqlpage from docker...
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions