feat: set up waitress
as production server
This commit is contained in:
parent
5d936900be
commit
3ef08de465
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
*/__pycache__
|
@ -8,4 +8,8 @@ FROM python:3
|
|||||||
# Install dependencies
|
# Install dependencies
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt /app/
|
COPY requirements.txt /app/
|
||||||
|
COPY lumi2 /app/lumi2/
|
||||||
|
COPY tests /app/tests/
|
||||||
|
COPY pytest.ini /app/
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
ENTRYPOINT ["waitress-serve", "--listen=0.0.0.0:80", "--no-ipv6", "--call", "lumi2:create_app"]
|
||||||
|
@ -6,25 +6,8 @@ services:
|
|||||||
lumi2:
|
lumi2:
|
||||||
build: .
|
build: .
|
||||||
container_name: lumi2
|
container_name: lumi2
|
||||||
command: flask --app /app/lumi2 --debug run --host 0.0.0.0 --port 80
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.py/:/app/config.py:ro
|
- ./config.py/:/app/config.py:ro
|
||||||
- ./lumi2/__init__.py:/app/lumi2/__init__.py:ro
|
|
||||||
- ./lumi2/auth.py:/app/lumi2/auth.py:ro
|
|
||||||
- ./lumi2/default_configuration.py:/app/lumi2/default_configuration.py:ro
|
|
||||||
- ./lumi2/exceptions.py:/app/lumi2/exceptions.py:ro
|
|
||||||
- ./lumi2/ldap.py:/app/lumi2/ldap.py:ro
|
|
||||||
- ./lumi2/logging.py:/app/lumi2/logging.py:ro
|
|
||||||
- ./lumi2/static/css:/app/lumi2/static/css:ro
|
|
||||||
- ./lumi2/static/fonts:/app/lumi2/static/fonts:ro
|
|
||||||
- ./lumi2/static/images/base:/app/lumi2/static/images/base:ro
|
|
||||||
- ./lumi2/static/images/default:/app/lumi2/static/images/default:ro
|
|
||||||
- ./lumi2/static/js:/app/lumi2/static/js:ro
|
|
||||||
- ./lumi2/templates/:/app/lumi2/templates/:ro
|
|
||||||
- ./lumi2/usermanager.py:/app/lumi2/usermanager.py:ro
|
|
||||||
- ./lumi2/usermodel.py:/app/lumi2/usermodel.py:ro
|
|
||||||
- ./lumi2/webapi.py:/app/lumi2/webapi.py:ro
|
|
||||||
- ./tests/fakedata.py/:/app/tests/fakedata.py:ro
|
|
||||||
environment:
|
environment:
|
||||||
- LUMI_CONFIG=/app/config.py
|
- LUMI_CONFIG=/app/config.py
|
||||||
ports:
|
ports:
|
||||||
@ -46,18 +29,6 @@ services:
|
|||||||
LDAP_DOMAIN: "example.com"
|
LDAP_DOMAIN: "example.com"
|
||||||
LDAP_ADMIN_PASSWORD: "admin"
|
LDAP_ADMIN_PASSWORD: "admin"
|
||||||
LDAP_CONFIG_PASSWORD: "admin"
|
LDAP_CONFIG_PASSWORD: "admin"
|
||||||
LDAP_TLS_VERIFY_CLIENT: "allow"
|
LDAP_TLS_VERIFY_CLIENT: "never"
|
||||||
lumi2-phpldapadmin:
|
|
||||||
container_name: lumi2-phpldapadmin
|
|
||||||
image: osixia/phpldapadmin
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- lumi2-openldap
|
|
||||||
ports:
|
|
||||||
- "8001:80"
|
|
||||||
environment:
|
|
||||||
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
|
|
||||||
PHPLDAPADMIN_HTTPS: "false"
|
|
||||||
PHPLDAPADMIN_SERVER_ADMIN: "admin"
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -9,3 +9,4 @@ Flask-WTF==1.0.1
|
|||||||
Flask-RESTful==0.3.9
|
Flask-RESTful==0.3.9
|
||||||
Faker==15.3.3
|
Faker==15.3.3
|
||||||
requests==2.28.1
|
requests==2.28.1
|
||||||
|
waitress==2.1.2
|
||||||
|
Loading…
Reference in New Issue
Block a user