我已经成功地将tryton和gnuhealth安装在带有docker文件的docker容器中。
在安装了web客户端sao之后,我可以登录,但是我得到了一个重复的通知弹出Calling method resources on is not allowed,它不断弹出,使得web客户端的使用变得不可能。最初,弹出消息是Forbidden,但我通过将postgres附加文件夹移动到gnuhealth用户空间来解决这个问题。
该消息来自浏览器is POST http://localhost:8000/health/bus 404 NOT FOUND中的调试控制台。
是否有一个特定版本的sao,我需要安装它的工作,我已经使用了sao从两个
git clone https://github.com/tryton/sao.git和hg clone http://hg.tryton.org/sao
我遵循的是Health/Installation,唯一的区别是我使用的是dockerfile和docker-组合。
我不知道问题出在哪里。
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码头工人撰写文件:
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: {}发布于 2019-08-25 15:59:23
GNU Health3.4使用Tryton4.6系列。所以你也必须使用sao的4.6系列。您可以在tryton-sao:https://downloads-cdn.tryton.org/4.6/的名称下找到它
但是,在Docker上设置GNU的另一种更简单的方法是使用Tryton映像tryton/tryton:4.6,使用pip安装GNU包。此映像包含trytond服务器和右sao。
https://stackoverflow.com/questions/57644972
复制相似问题