Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5641b3e740 | |||
| 9317a1baae | |||
| 6f6d90aa60 | |||
| 83a45795c3 | |||
| 572c52dada | |||
| 909655c10a | |||
| c71667cd41 | |||
| 787a376553 | |||
| 7f4be9da36 | |||
| d6f69bca9d | |||
| 40b63fff6a |
@@ -21,6 +21,8 @@ static/sets/
|
|||||||
# Temporary
|
# Temporary
|
||||||
*.csv
|
*.csv
|
||||||
/local/
|
/local/
|
||||||
|
run_local.sh
|
||||||
|
settings.local.json
|
||||||
|
|
||||||
# Apple idiocy
|
# Apple idiocy
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
+5
-5
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
### Current PR
|
### 1.2.4
|
||||||
|
|
||||||
- Added search/filter/sort options to `parts` and `minifigures`.
|
|
||||||
|
|
||||||
### Next PR
|
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
> To use the new BrickLink color parameter in URLs, update your `.env` file:
|
> To use the new BrickLink color parameter in URLs, update your `.env` file:
|
||||||
@@ -18,6 +14,10 @@
|
|||||||
- Enhanced BrickLink URL generation with proper part number fallback
|
- Enhanced BrickLink URL generation with proper part number fallback
|
||||||
- Extended admin set refresh to detect and track missing BrickLink data
|
- Extended admin set refresh to detect and track missing BrickLink data
|
||||||
|
|
||||||
|
## 1.2.3
|
||||||
|
|
||||||
|
Added search/filter/sort options to `parts` and `minifigures`.
|
||||||
|
|
||||||
## 1.2.2
|
## 1.2.2
|
||||||
|
|
||||||
Fix legibility of "Damaged" and "Missing" fields for tiny screen by reducing horizontal padding
|
Fix legibility of "Damaged" and "Missing" fields for tiny screen by reducing horizontal padding
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ WORKDIR /app
|
|||||||
# Bricktracker
|
# Bricktracker
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Fix line endings and set executable permissions for entrypoint script
|
||||||
|
RUN sed -i 's/\r$//' entrypoint.sh && chmod +x entrypoint.sh
|
||||||
|
|
||||||
# Python library requirements
|
# Python library requirements
|
||||||
RUN pip --no-cache-dir install -r requirements.txt
|
RUN pip --no-cache-dir install -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This need to be first
|
# This need to be first
|
||||||
import eventlet
|
import gevent.monkey
|
||||||
eventlet.monkey_patch()
|
gevent.monkey.patch_all()
|
||||||
|
|
||||||
import logging # noqa: E402
|
import logging # noqa: E402
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class BrickSocket(object):
|
|||||||
*args,
|
*args,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
path=app.config['SOCKET_PATH'],
|
path=app.config['SOCKET_PATH'],
|
||||||
async_mode='eventlet',
|
async_mode='gevent',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Store the socket in the app config
|
# Store the socket in the app config
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
__version__: Final[str] = '1.2.2'
|
__version__: Final[str] = '1.2.4'
|
||||||
__database_version__: Final[int] = 17
|
__database_version__: Final[int] = 17
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ def update() -> Response:
|
|||||||
BrickSet(),
|
BrickSet(),
|
||||||
minifigure=BrickMinifigure(record={
|
minifigure=BrickMinifigure(record={
|
||||||
'set_img_url': None,
|
'set_img_url': None,
|
||||||
|
'image': None,
|
||||||
})
|
})
|
||||||
).download()
|
).download()
|
||||||
|
|
||||||
@@ -33,7 +34,9 @@ def update() -> Response:
|
|||||||
BrickSet(),
|
BrickSet(),
|
||||||
part=BrickPart(record={
|
part=BrickPart(record={
|
||||||
'part_img_url': None,
|
'part_img_url': None,
|
||||||
'part_img_url_id': None
|
'part_img_url_id': None,
|
||||||
|
'image_id': None,
|
||||||
|
'image': None,
|
||||||
})
|
})
|
||||||
).download()
|
).download()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,4 +13,4 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Execute the WSGI server
|
# Execute the WSGI server
|
||||||
gunicorn --bind "${BK_SERVER}:${BK_PORT}" "app:create_app()" --worker-class "eventlet" "$@"
|
gunicorn --bind "${BK_HOST}:${BK_PORT}" "wsgi:application" --worker-class "gevent" --workers 1 "$@"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ eventlet
|
|||||||
flask
|
flask
|
||||||
flask_socketio
|
flask_socketio
|
||||||
flask-login
|
flask-login
|
||||||
|
gevent
|
||||||
gunicorn
|
gunicorn
|
||||||
humanize
|
humanize
|
||||||
jinja2
|
jinja2
|
||||||
|
|||||||
@@ -91,8 +91,12 @@
|
|||||||
<script src="{{ url_for('static', filename='scripts/socket/instructions.js') }}"></script>
|
<script src="{{ url_for('static', filename='scripts/socket/instructions.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='scripts/socket/set.js') }}"></script>
|
<script src="{{ url_for('static', filename='scripts/socket/set.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='scripts/table.js') }}"></script>
|
<script src="{{ url_for('static', filename='scripts/table.js') }}"></script>
|
||||||
|
{% if request.endpoint == 'minifigure.list' %}
|
||||||
<script src="{{ url_for('static', filename='scripts/minifigures.js') }}"></script>
|
<script src="{{ url_for('static', filename='scripts/minifigures.js') }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
{% if request.endpoint == 'part.list' %}
|
||||||
<script src="{{ url_for('static', filename='scripts/parts.js') }}"></script>
|
<script src="{{ url_for('static', filename='scripts/parts.js') }}"></script>
|
||||||
|
{% endif %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
setup_grids();
|
setup_grids();
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
WSGI entry point for BrickTracker - Production Docker deployment
|
||||||
|
This ensures proper gevent monkey patching before any imports
|
||||||
|
"""
|
||||||
|
|
||||||
|
# CRITICAL: Monkey patch must be first, before ANY other imports
|
||||||
|
import gevent.monkey
|
||||||
|
gevent.monkey.patch_all()
|
||||||
|
|
||||||
|
# Now import the regular app factory
|
||||||
|
from app import create_app
|
||||||
|
|
||||||
|
# Create the application - this will be a BrickSocket instance
|
||||||
|
app_instance = create_app()
|
||||||
|
|
||||||
|
# For gunicorn, we need the Flask app, not the BrickSocket wrapper
|
||||||
|
application = app_instance.app if hasattr(app_instance, 'app') else app_instance
|
||||||
Reference in New Issue
Block a user