使用docker搭建phabricator

docker方式

docker run -it --name phabricator_database -p 3306:3306 phabricator_database
docker run -it --name phabricator -p 9091:80 --link phabricator_database:database phabricator

k8s方式

pod

apiVersion: v1
kind: Pod
metadata:
  name: phabricator
  namespace: default
  labels: 
    name: phabricator
spec:
  restartPolicy: Never
  containers:
    - name: phabricator-web
      image: phabricator
      imagePullPolicy: Always
      ports:
        - containerPort: 80
       env:
         - name: database
           value: localhost

    - name: phabricator-database
      image:  phabricator_database
      imagePullPolicy: Always
      ports:
        - containerPort: 3306

svc

apiVersion: v1
kind: Service
metadata: 
  namespace: default
  name: phabricator-service
  labels: 
    name: phabricator
spec: 
  type: NodePort
  ports:
    # the port that this service should serve on
    - port: 80
      nodePort: 31000
  # label keys and values that must match in order to receive traffic for this service
  selector: 
    name: phabricator
    原文作者:codecraft
    原文地址: https://segmentfault.com/a/1190000006243691
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞