Docker update

This commit is contained in:
2026-06-01 16:49:15 -04:00
parent 9607eac224
commit 278303f541
2 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -10,4 +10,4 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
EXPOSE 8000 EXPOSE 80
+9 -3
View File
@@ -16,7 +16,7 @@ services:
web: web:
build: . build: .
command: ["gunicorn", "--bind", "0.0.0.0:8000", "app.web:app"] command: ["gunicorn", "--bind", "0.0.0.0:80", "app.web:app"]
environment: environment:
DATABASE_URL: ${DATABASE_URL:-mysql+pymysql://${MYSQL_USER:-switchbot}:${MYSQL_PASSWORD:-switchbot_password}@db:3306/${MYSQL_DATABASE:-switchbot}} DATABASE_URL: ${DATABASE_URL:-mysql+pymysql://${MYSQL_USER:-switchbot}:${MYSQL_PASSWORD:-switchbot_password}@db:3306/${MYSQL_DATABASE:-switchbot}}
SWITCHBOT_TOKEN: ${SWITCHBOT_TOKEN:-} SWITCHBOT_TOKEN: ${SWITCHBOT_TOKEN:-}
@@ -24,11 +24,12 @@ services:
COLLECT_INTERVAL_SECONDS: ${COLLECT_INTERVAL_SECONDS:-900} COLLECT_INTERVAL_SECONDS: ${COLLECT_INTERVAL_SECONDS:-900}
APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London} APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London}
FLASK_SECRET_KEY: ${FLASK_SECRET_KEY:-dev-only-secret} FLASK_SECRET_KEY: ${FLASK_SECRET_KEY:-dev-only-secret}
ports:
- "8000:8000"
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy
networks:
- default
- webapps
collector: collector:
build: . build: .
@@ -46,3 +47,8 @@ services:
volumes: volumes:
mysql_data: mysql_data:
networks:
default:
webapps:
external: true