Docker update
This commit is contained in:
+1
-1
@@ -10,4 +10,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
EXPOSE 80
|
||||
|
||||
+9
-3
@@ -16,7 +16,7 @@ services:
|
||||
|
||||
web:
|
||||
build: .
|
||||
command: ["gunicorn", "--bind", "0.0.0.0:8000", "app.web:app"]
|
||||
command: ["gunicorn", "--bind", "0.0.0.0:80", "app.web:app"]
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL:-mysql+pymysql://${MYSQL_USER:-switchbot}:${MYSQL_PASSWORD:-switchbot_password}@db:3306/${MYSQL_DATABASE:-switchbot}}
|
||||
SWITCHBOT_TOKEN: ${SWITCHBOT_TOKEN:-}
|
||||
@@ -24,11 +24,12 @@ services:
|
||||
COLLECT_INTERVAL_SECONDS: ${COLLECT_INTERVAL_SECONDS:-900}
|
||||
APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London}
|
||||
FLASK_SECRET_KEY: ${FLASK_SECRET_KEY:-dev-only-secret}
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- default
|
||||
- webapps
|
||||
|
||||
collector:
|
||||
build: .
|
||||
@@ -46,3 +47,8 @@ services:
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
webapps:
|
||||
external: true
|
||||
Reference in New Issue
Block a user