new files in new locations
Changes to be committed: new file: Dockerfile new file: scenesense-docker/docker-compose.yml
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# Use the official Python image with Python 3.10
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
# Set the working directory to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements.txt into the container at /app
|
||||
COPY requirements.txt /app/
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
||||
|
||||
# Copy server file
|
||||
COPY server/server_api.py /app/
|
||||
# Expose port 5000 for the Flask app to listen on
|
||||
EXPOSE 5000
|
||||
|
||||
# Define environment variable for Flask to run in production mode
|
||||
ENV FLASK_ENV=production
|
||||
|
||||
# Run the Flask app
|
||||
CMD ["python", "server_api.py"]
|
||||
27
scenesense-docker/docker-compose.yml
Normal file
27
scenesense-docker/docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3'
|
||||
services:
|
||||
db:
|
||||
image: mariadb:11.0
|
||||
container_name: scenesense-db
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./db:/var/lib/mysql
|
||||
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
||||
|
||||
app:
|
||||
image: scenesense-server:1.0
|
||||
container_name: scenesense-app
|
||||
ports:
|
||||
- "15000:5000"
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
adminer:
|
||||
image: adminer:latest
|
||||
container_name: scenesense-db-adminer
|
||||
restart: always
|
||||
ports:
|
||||
- "18000:8080"
|
||||
Reference in New Issue
Block a user