Comments (18)
It is more than one file, therefore I have created a repository: https://github.com/verahawk/davis-docker
To build it, run: docker build -t davis --build-arg='VERSION=2.0.2' .
You can find an example compose file in the example directory. Don't forget to run docker exec -it davis ash -c "APP_ENV=prod bin/console doctrine:schema:create --no-interaction"
, afterwards.
from davis.
I have started a first branch to use Alpine Linux instead of the regular distro, here: #77
I have already included the PostgreSQL PDO module in the image. I need to do some more testing, but the size gain is nice.
A second PR will look into how to make this work on the Symfony side. It might not come before two or three weeks as I'll be off.
Happy to have your thoughts on the Alpine version if ever you have some spare minutes :)
from davis.
Thanks @verahawk for this issue
I could easily add other drivers in the Dockerfile, that's easy.
As for Symfony, I can have a look. I think it can be a bit more difficult than just changing the driver in the Doctrine configuration..
As for Alpine, happy to view your Dockerfile so I can work from there.
TBH, I don't have much time to dig too deep though, so this may take a bit of time
from davis.
If you have any questions, feel free to ask. Although, it's been a while, so I might not remember why I have done things in a particular way ;)
from davis.
#79 has now been merged. I have released v3.1.0 (v3.0.0 has been yanked) with a new DATABASE_DRIVER
env var (supporting MySQL and PostgreSQL for now)
LMK what you think. The release notes contain a lot of information (same as yanked version) since the schema has been partially migrated, and there is no straightforward path if you were using PostgreSQL before.
I'll try to test SQLite later, but don't hesitate to do it if you have the opportunity. If using it is possible, I'll need to add a bunch of SQLite-specific migrations since I'm now enforcing the platform + the migration path.
Closing for now as the original request (having a different driver for the Dockerized install) is now fulfilled π
from davis.
Hey @verahawk,
is it possible that you share the image as long as tchapi has little time at the moment? That would be very nice.
from davis.
I can have a look at the Dockerfile and try to use alpine as a base but @verahawk has not provided it yet, I'd prefer not starting from scratch :)
from davis.
Oh, I completely forgot about this issue. Though, I still have project files. I will create a repo soon and post it here.
from davis.
You can just dump the Dockerfile in this issue, it's fine for me, no need to create a PR
from davis.
Ok thanks a lot! I will have a look and try to see what I can extract ππΌ
from davis.
FYI after investigating a bit, PostgreSQL is not trivial: the VARBINARY
format is not treated the same way by PDO/Doctrine on MySQL and Postgres, and leads to problems (because sabre/dav does not really support PostgreSQL), so I will probably need to:
- alter some column definitions
- make a new major version (because kind of BC)
- add support for changing the driver
So a bit of work π
from davis.
Shame it is not so simple. Having an easy way to switch between mysql and sqlite will be good starting point anyway. Thanks for your work :-)
from davis.
Thanks also from my side.
Would it make sense to implement nginx as part of the change to Alpine? This way you would have an all-in-one solution in only one container, if you use SQLite. Or are there any opposing opinions on this?
from davis.
That's how it is done in the image, I have provided. I agree it would be nice to at least have two versions β one fpm and the other self-contained.
from davis.
I understand the need but it defeats the purpose of Docker in my opinion, because you'll end up with two processes in a single container, which is not ideal (and not the way Docker is supposed to work). You then have to add another supervisor process on top of both to allow for restarts / failure detection / health-check, etc ... and it's become a bit scrappy.
If I was to make an all-in-one container by the way, I would definitely not use nginx to be honest, but probably something more opinionated (maybe Caddy or Traefik for instance).
That being said, given the bandwidth I have at the moment, I'd rather focus on:
- reducing the image size (in progress)
- fixing the database columns (inherited from Baikal) that prevent the usage of Postgres (and possibly of other drivers)
- allow Postgres and later SQLite as options to the Symfony stack
If a community effort arises with an "all-in-one" container, I'll be happy to link to it in the readme anyway :)
from davis.
If it helps or makes anyone happy, I can see if I can get it to play nicely with nginx unit. Itβs kinda finicky with PHP applications though, because thereβs a ton of weirdness.
Iβm currently running Davis in a Podman container with H2O and php-cgi which also accomplishes running with a single executable.
from davis.
I have merged and pre-released v3.0.0 that fixes the database columns. If you don't use MySQL, I suggest to be very cautious since you will probably need to manually cast some column into VARCHAR
(they were VARBINARY
before)
I have tried to explain in length the upgrade process for the MySQL driver. I will let this sit for a while, and the next step will be to introduce a env var to select a specific driver. So far, I have tested the code with MySQL, MariaDB and PostgreSQL but not with SQLite.
from davis.
β‘οΈ Work continues in #79
from davis.
Related Issues (20)
- (Possibility to) hide version number on public page HOT 1
- [Bug] Deleting shared calendar leads to exception for viewing the shared calendars HOT 4
- Specifying admin user via LDAP HOT 2
- new install - 500 error on startup - no db tables created HOT 4
- [Question] Integrating this program into a selfhosted server HOT 4
- are you aware of the problems with google and microsoft .ics files? HOT 10
- LDAP password is logged in clear text HOT 15
- Password storage for LDAP and IMAP login HOT 1
- sabre framework response with error 500 with PHP 8.2 HOT 13
- [Feature Request] Let public calendars be shareable
- Geo-Request not Working HOT 8
- `AddressBookType` class does not exist HOT 2
- DAVx5 cannot connect a new account to v4.2.0 HOT 16
- Logging directory with davis version 4.2.x HOT 2
- Username could not be found HOT 10
- Recreate a deletet user: Internal server error HOT 3
- Upgrade with MySQL backend : "Data too long for column 'carddata'" HOT 5
- Authorization in admin ui HOT 5
- [Crosspost] Have a calender to be subscribable without authentication HOT 6
- LDAP: Bind failed HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from davis.