How to deploy discuz forum on k8s cluster

8/10/2017

Basically I want to deploy a discuz forum to my k8s cluster with below image https://hub.docker.com/r/skyzhou/docker-discuz/

the mysql image is easy to deploy but the discuz forum doesn't provide any env variable for me to inject for datase, it is only allowed for links parameter,

The question is on k8s cluster there is no such way for me to inject this, so it is stuck.

The wordpress blog could expose the db-host and db_password parameter.

-- June
docker
kubernetes

2 Answers

8/11/2017

I have successfully deployed to my cluster and the port is set to 80 though I wish to expose it to 8080 not sure how.@Matthew L Daniel

-- June
Source: StackOverflow

8/10/2017

The MYSQL_PORT_3306_TCP variable is used in a misleading way, as one can see where it is stripped of the leading tcp:// and used as DISCUZ_DB_HOST

Thus, I would expect:

containers:
- name: discuz
  image: skyzhou/docker-discuz
  env:
  - name: MYSQL_PORT_3306_TCP
    value: $(SERVICE_MYSQL_HOST):$(SERVICE_MYSQL_PORT)

should do the trick if you already have a mysql Service in kubernetes, or simply fill in the host and port if you already know them

-- mdaniel
Source: StackOverflow