Tryton Docker instructions

258 views
Skip to first unread message

Maxime Richez

unread,
Nov 29, 2017, 3:56:14 AM11/29/17
to tryton
Hi,

Yesterday, i made tryton docker installation following instructions on the docker page: https://hub.docker.com/r/tryton/tryton/

I noticed that created volumes at the first instruction are never used because other instructions never use them...

To use the "postgres" volume, the instruction "Start a PostgreSQL instance" should be:

sudo docker run --name tryton-postgres -v postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres

Don't know if it's really needed to create a tryton volume, as the only volume that could be exposed in tryton docker is "/var/lib/trytond/db". Maybe if we plan to use an sqlite database? Else it seems useless...

I would like also sharing a nice tool to easily manage your docker environment:

https://portainer.io/

Sergi Almacellas Abellana

unread,
Nov 29, 2017, 4:55:40 AM11/29/17
to try...@googlegroups.com
El 29/11/17 a les 09:56, Maxime Richez ha escrit:
> Hi,
>
> Yesterday, i made tryton docker installation following instructions on the docker page:https://hub.docker.com/r/tryton/tryton/
>
> I noticed that created volumes at the first instruction are never used because other instructions never use them...
>
> To use the "postgres" volume, the instruction "Start a PostgreSQL instance" should be:
>
> sudo docker run --name tryton-postgres -v postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres

Could you fill and issue and propose a patch to fix it?
Here is the repo:

http://hg.tryton.org/tryton-docker

Thanks,

>
> Don't know if it's really needed to create a tryton volume, as the only volume that could be exposed in tryton docker is "/var/lib/trytond/db". Maybe if we plan to use an sqlite database? Else it seems useless...

It's used to store the files uploaded to tryton that use a FileStore.
For example record attachments.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cédric Krier

unread,
Nov 29, 2017, 5:10:06 AM11/29/17
to try...@googlegroups.com
On 2017-11-29 10:55, Sergi Almacellas Abellana wrote:
> El 29/11/17 a les 09:56, Maxime Richez ha escrit:
> > Hi,
> >
> > Yesterday, i made tryton docker installation following instructions on the docker page:https://hub.docker.com/r/tryton/tryton/
> >
> > I noticed that created volumes at the first instruction are never used because other instructions never use them...
> >
> > To use the "postgres" volume, the instruction "Start a PostgreSQL instance" should be:
> >
> > sudo docker run --name tryton-postgres -v postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres
>
> Could you fill and issue and propose a patch to fix it?

I'm wondering what is the best options:

- show simple command without volume bound and let docker create
unnamed volumes

- show more complex command with volume bound and keep volume
creation command.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Maxime Richez

unread,
Nov 29, 2017, 5:39:44 AM11/29/17
to tryton
> > Could you fill and issue and propose a patch to fix it?
>
> I'm wondering what is the best options:
>
> - show simple command without volume bound and let docker create
> unnamed volumes
>
> - show more complex command with volume bound and keep volume
> creation command.
>
What should i choose for the patch? Poll ?

Sergi Almacellas Abellana

unread,
Nov 29, 2017, 5:48:54 AM11/29/17
to try...@googlegroups.com
El 29/11/17 a les 11:39, Maxime Richez ha escrit:
I think we should keep the commands simple for newcomers.

Indeed, users with more docker knowledge will probably use it's own
custom commands.

Maxime Richez

unread,
Nov 29, 2017, 6:58:39 AM11/29/17
to tryton

> > What should i choose for the patch? Poll ?
> I think we should keep the commands simple for newcomers.
>
> Indeed, users with more docker knowledge will probably use it's own
> custom commands.
>
ok. Could you add "tryton-docker" in the list of components in bugtracker?

Cédric Krier

unread,
Nov 29, 2017, 8:55:06 AM11/29/17
to try...@googlegroups.com
On 2017-11-29 11:48, Sergi Almacellas Abellana wrote:
> El 29/11/17 a les 11:39, Maxime Richez ha escrit:
> >>> Could you fill and issue and propose a patch to fix it?
> >> I'm wondering what is the best options:
> >>
> >> - show simple command without volume bound and let docker create
> >> unnamed volumes
> >>
> >> - show more complex command with volume bound and keep volume
> >> creation command.
> >>
> > What should i choose for the patch? Poll ?
> I think we should keep the commands simple for newcomers.
>
> Indeed, users with more docker knowledge will probably use it's own
> custom commands.

OK but how would you know the path of the volumes?

Gonzalo González Domínguez

unread,
Nov 29, 2017, 9:10:06 AM11/29/17
to tryton
Experienced users probaly will use docker-compose/ansible

Sergi Almacellas Abellana

unread,
Nov 29, 2017, 9:41:09 AM11/29/17
to try...@googlegroups.com
El 29/11/17 a les 14:51, Cédric Krier ha escrit:
> On 2017-11-29 11:48, Sergi Almacellas Abellana wrote:
>> El 29/11/17 a les 11:39, Maxime Richez ha escrit:
>>>>> Could you fill and issue and propose a patch to fix it?
>>>> I'm wondering what is the best options:
>>>>
>>>> - show simple command without volume bound and let docker create
>>>> unnamed volumes
>>>>
>>>> - show more complex command with volume bound and keep volume
>>>> creation command.
>>>>
>>> What should i choose for the patch? Poll ?
>> I think we should keep the commands simple for newcomers.
>>
>> Indeed, users with more docker knowledge will probably use it's own
>> custom commands.
>
> OK but how would you know the path of the volumes?
>
Don't know. Just tried one of two options you proposed :)

Thierry Bruyere

unread,
Nov 29, 2017, 9:42:07 AM11/29/17
to tryton
You can find the volume with the command :

docker inspect --format "{{ .Mounts }}" tryton-postgres


Cédric Krier

unread,
Nov 29, 2017, 10:15:08 AM11/29/17
to tryton
You mean: docker inspect --format "{{ .Config.Volumes }}" tryton/tryton

Not sure anyone will know that.

Maxime Richez

unread,
Nov 29, 2017, 2:12:07 PM11/29/17
to tryton
So rollback with my issue ? (https://bugs.tryton.org/issue6974 ) and adding volume in the commands ?

Albert Cervera i Areny

unread,
Nov 29, 2017, 5:24:04 PM11/29/17
to try...@googlegroups.com
Looks very nice. It would be great if portainer included a template
for starting a tryton container.

>
> --
> You received this message because you are subscribed to the Google Groups "tryton" group.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/74440d35-c9a1-49af-a52c-7b7f8706ab1a%40googlegroups.com.



--
Albert Cervera i Areny
http://www.NaN-tic.com
Tel. 93 553 18 03
Reply all
Reply to author
Forward
0 new messages