tematres / TemaTres-Vocabulary-Server

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
https://vocabularyserver.com
124 stars 53 forks source link

Docker compatibility #32

Closed regisnew closed 4 years ago

regisnew commented 6 years ago

It will be cool and easiest if the application run at docker containers.

tematres commented 6 years ago

https://store.docker.com/community/images/systemsector/tematres

(this docker have tematres 2.2)

juanda99 commented 5 years ago

We are going to use TemaTres for our app, for managing taxanomies of our software. As all our envirnonment is dockerized, it will be our way to go. Previous link doesn't provide a Dockerfile or docker-compose file so it's not good for us. It also uses previous version so I guess it's better two use version 3, isn't it?

We can make our dockerfile afterwards available to all users, however I have two questions:

I guess mysql version 5.7 is ok. php version in your wiki doc says something about v4 or 5. Should we use php 5.6 (currently not supported) or, even go for version 7.3?

Thank you!

tematres commented 5 years ago

Hi @juanda99 :) I'm very happy about your initiative to put TemaTres in Docker. We test in production Tematres in PHP Version 7.0.33 and MySql mysql 5.7 (mysql 5.7.25). If you want we can test Tematres on PHP 7.3 Please let me know about any problem or doubt :)

best regards!

T1loc commented 4 years ago

Hello,

One thing would be amazing will be to fetch some configuration from environment variables and the db password from secrets/or environment variables.

For my usage I use this dockerfile :

# This Dockerfile uses the latest version of the Bitnami PHP-FPM Docker image
FROM php:7.4-apache

# Copy app's source code to the /app directory
COPY app-code /var/www/html

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

RUN docker-php-source extract && \
    docker-php-ext-install mysqli \
    && docker-php-source delete

I do not need a mysql inside since I use an external service for that.

You can also use the image with kubernetes :

---
apiVersion: v1
kind: Pod
metadata:
  name: tematres
  labels:
    app: tematres
spec:
  containers:
  - name: tematres
    image: tematresImageBuiltPreviously
    ports:
    - containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
  name: tematres
spec:
  selector:
    app: tematres
  ports:
  - port: 80
    targetPort: 80

---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "nginx"
  name: tematres
spec:
  rules:
  - host: url.of.tematres
    http:
      paths:
      - backend:
          serviceName: tematres
          servicePort: 80

Some other things:

Edit:

tematres commented 4 years ago

Hi @T1loc :) thank you about the feedback and in special about the las 3 recomendations :). We go to:

  1. add config option to set collation
  2. adopt InnoDB and add config option about this

About URI: Tematres can manage many instances with the same core, so we use the URI of each vocab to manage differentiate sessions. You can change the URI in config form. Another solution can be use relative URL in navigation.

About Dokeos... I do not have experience with dokeos... please help me to help :) I know case about tematres fork who add tiny script to create tematres instances (http://vocabularios.educacion.gov.ar/admin/)

Best regards :)

T1loc commented 4 years ago

Hello @tematres

Thank you, for 2 points.

About docker :

If it's enough for @regisnew and @juanda99 I can provide you the PR.

T1loc commented 4 years ago

@tematres But it will be nice to have the #53 if we want to be able to use multiple replicas on docker :-)

tematres commented 4 years ago

Please check the new commit, we add support in db.tematres.php for InnoDB and charset configuration :). Thank you!

T1loc commented 4 years ago

it looks good ! thank you.