Closed winniehell closed 1 year ago
Hi @winniehell,
it works for me with the following command:
$ docker pull senaite/senaite:2.x
$ docker run -p 8081:8080 -e PASSWORD="12345" -e SITE="senaite" senaite/senaite:2.x
Open the browser on http://localhost:8081/senaite
Also check out this docker-compose
file: https://github.com/senaite/senaite.docker/issues/9#issuecomment-1112236898
Or if you prefer the full-fledged cluster setup version including your own add-on:
version: "3.9"
services:
nginx:
container_name: nginx
restart: "unless-stopped"
image: nginx:latest
ports:
- 8000:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./ssl-cert-snakeoil.pem:/etc/nginx/ssl/nginx.cert
- ./ssl-cert-snakeoil.key:/etc/nginx/ssl/nginx.key
links:
- haproxy
haproxy:
container_name: haproxy
restart: unless-stopped
image: haproxy:lts
ports:
- 8888:80
- 8889:8404
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
links:
- client1
- client2
zeo:
container_name: zeo
image: senaite/senaite:2.x
restart: "unless-stopped"
command: zeo
volumes:
- ./data:/data
client1:
container_name: client1
image: senaite/senaite:2.x
restart: "unless-stopped"
ports:
- "8081:8080"
links:
- zeo
deploy:
resources:
limits:
memory: 4GB
environment:
ZEO_ADDRESS: "zeo:8080"
ADDONS: "myaddon.lims senaite.databox senaite.storage"
SOURCES: "myaddon.lims=fs myaddon.lims,senaite.storage=git https://github.com/senaite/senaite.storage.git branch=2.x,senaite.databox=git https://github.com/senaite/senaite.databox.git branch=master"
volumes:
# we need to be selective here, because build files with symlinks, e.g. parts/omelette, cause problems.
- ../setup.py:/home/senaite/senaitelims/src/myaddon.lims/setup.py
- ../README.md:/home/senaite/senaitelims/src/myaddon.lims/README.md
- ../src/myaddon:/home/senaite/senaitelims/src/myaddon.lims/src/myaddon
client2:
container_name: client2
image: senaite/senaite:2.x
restart: "unless-stopped"
ports:
- "8082:8080"
links:
- zeo
deploy:
resources:
limits:
memory: 4GB
environment:
ZEO_ADDRESS: "zeo:8080"
ADDONS: "myaddon.lims senaite.databox senaite.storage"
SOURCES: "myaddon.lims=fs myaddon.lims,senaite.storage=git https://github.com/senaite/senaite.storage.git branch=2.x,senaite.databox=git https://github.com/senaite/senaite.databox.git branch=master"
volumes:
# we need to be selective here, because build files with symlinks, e.g. parts/omelette, cause problems.
- ../setup.py:/home/senaite/senaitelims/src/myaddon.lims/setup.py
- ../README.md:/home/senaite/senaitelims/src/myaddon.lims/README.md
- ../src/myaddon:/home/senaite/senaitelims/src/myaddon.lims/src/myaddon
volumes:
data:
external: true
$ docker run -p 8081:8080 -e PASSWORD="12345" -e SITE="senaite" senaite/senaite:2.x
@ramonski thank you, I can confirm this command works :+1: however it still crashes when leaving out -e SITE="senaite"
:
$ docker run -p 8081:8080 -e PASSWORD="12345" senaite/senaite:2.x
Ah, this makes sense, because no Plone site is installed then. Maybe this option should imply then the site creation (even if not specified)
@ramonski I think I have a rough idea now how to solve it and I'm going to update https://github.com/senaite/senaite.docker/pull/13 (not today though :sleeping:)
thank you, for your help! :pray:
When setting the
PASSWORD
environment variable on a new container I get the following error:tested on latest 2.x image (
8c142a35419a
)