【问题标题】:Sao for tryton 4.6 and gnuhealth用于 tryton 4.6 和 gnuhealth 的 Sao
【发布时间】:2019-08-25 09:51:11
【问题描述】:

我已经设法在一个带有 docker 文件的 docker 容器中安装了 tryton 和 gnuhealth。

安装 Web 客户端 sao 后,我可以登录,但我收到一个重复的通知弹出窗口 Calling method resources on is not allowed 它不断弹出,使 Web 客户端的使用变得不可能。 最初弹出消息是Forbidden,但我通过将 postgres 附加文件夹移动到 gnuhealth 用户空间解决了这个问题。

消息是从浏览器中的调试控制台获取的 POST http://localhost:8000/health/bus 404 NOT FOUND

是否需要安装特定版本的 sao 才能正常工作 我都用过sao
git clone https://github.com/tryton/sao.githg clone http://hg.tryton.org/sao

我关注https://en.wikibooks.org/wiki/GNU_Health/Installation 唯一的区别是我使用的是 dockerfile 和 docker-compose

我不确定是什么问题。

Dockerfile:

FROM python:3.7

RUN apt-get update
RUN apt-get -y install curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_11.x  | bash -

RUN apt-get -y install sudo \
       nano \
       gcc \
       g++ \
       patch \
       vim

RUN adduser gnuhealth && \
    echo "gnuhealth ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/gnuhealth && \
    chmod 0440 /etc/sudoers.d/gnuhealth

USER gnuhealth
RUN sudo apt-get install nodejs
ENV PATH="/home/gnuhealth/.local/bin:/home/gnuhealth/gnuhealth/tryton/server/trytond-4.6.19/bin:${PATH}"
WORKDIR home/gnuhealth

RUN wget https://ftp.gnu.org/gnu/health/gnuhealth-latest.tar.gz
RUN wget https://ftp.gnu.org/gnu/health/gnuhealth-3.4.1.tar.gz.sig
RUN tar xzf gnuhealth-latest.tar.gz

WORKDIR ./gnuhealth-3.4.1

RUN wget -qO- https://ftp.gnu.org/gnu/health/gnuhealth-setup-latest.tar.gz | tar -xzvf -
RUN pip install --user --upgrade pip setuptools wheel
RUN ./gnuhealth-setup install

RUN echo '[database] \n\
uri = postgresql://database:5432 \n\
path = /home/gnuhealth/attach \n\
\n\
[web] \n\
listen = *:8000 \n\
root=/home/gnuhealth/sao \n\
\n\
[webdav] \n\
listen = *:8080 \n\
ssl_webdav = False\n' > ~/gnuhealth/tryton/server/config/trytond.conf

WORKDIR /home/gnuhealth
RUN hg clone http://hg.tryton.org/sao sao
WORKDIR ./sao
RUN sudo npm install -g grunt-cli
RUN npm install grunt --save-dev
RUN npm install --production
RUN npm audit fix
RUN grunt

Docker 编写文件:

version: '3.7'

services:
  database:
    image: postgres
    ports:
      - 5432:5432
    volumes:
      - pgdata:/var/lib/postgresql/data


  gnuserver:
    build:
      context: .
      dockerfile: Dockerfile
    links:
     - database

    ports:
      - 8000:8000
    environment:
      - PGPASSWORD=postgres
      - PGUSER=postgres
      - PGDATABASE=postgres
      - PGHOST=database
      - PGPORT=5432
    depends_on:
      - database
    command: ./start_gnuhealth.sh

volumes:
  pgdata: {}

【问题讨论】:

    标签: postgresql docker-compose dockerfile webclient tryton


    【解决方案1】:

    GNU Health 3.4 使用 Tryton 4.6 系列。所以你也必须使用sao的4.6系列。你可以在tryton-sao这个名字下找到它:https://downloads-cdn.tryton.org/4.6/

    但在 Docker 上设置 GNU Health 的另一种更简单的方法是使用 Tryton docker 映像 tryton/tryton:4.6 并使用 pip 安装 GNU Health 包。此图包含 trytond 服务器和正确的 sao。

    【讨论】:

    • 即使我拉取 tryton/tryton;4.6 图像,我也会得到同样的错误
    • 我猜你没有正确获取 4.6 系列或网页没有正确刷新,因为 4.6 系列没有任何“总线”参考(仅在 5.0 中添加)。
    • 是的。当我将此行 RUN hg clone http://hg.tryton.org/sao sao 更改为 RUN hg clone http://hg.tryton.org/sao -r 4.6.20 sao 时,我停止收到错误消息
    • 我正在查看您的第二个建议。我有一个问题here
    • 如果您想始终拥有 4.6 系列的最后一次提交,您可以运行:hg clone -b 4.6 https://hg.tryton.org/sao
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-24
    • 1970-01-01
    • 2019-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多