我已经设法在带有 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 才能正常
git clone https://github.com/tryton/sao.git
工作
hg 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: {}