update docker
add port exposure for webgui add mariadb to docker compose
This commit is contained in:
parent
6e1d578a70
commit
181b90f822
@ -7,8 +7,11 @@ WORKDIR /app
|
||||
# Copy the script1.py and any other necessary files
|
||||
COPY ./Helloworld.py /app/
|
||||
|
||||
#expose port
|
||||
EXPOSE 5000
|
||||
|
||||
# Install any dependencies
|
||||
RUN pip install --no-cache-dir Flask==2.1.2
|
||||
RUN pip install --no-cache-dir -r ./requirements.py
|
||||
|
||||
# Set the entry point
|
||||
CMD ["python", "Helloworld.py"]
|
||||
|
||||
@ -10,4 +10,20 @@ services:
|
||||
build:
|
||||
context: ./WebGui
|
||||
dockerfile: ./DOCKERFILE
|
||||
|
||||
ports:
|
||||
- '80:5000'
|
||||
|
||||
database:
|
||||
image: 'mariadb:10.3'
|
||||
container_name: database
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_USER: user
|
||||
- MYSQL_PASSWORD: mypassword
|
||||
- MYSQL_DATABASE: my_database
|
||||
- MYSQL_ROOT_PASSWORD: rootpassword
|
||||
|
||||
ports:
|
||||
- '3306:3306'
|
||||
volumes:
|
||||
- ${PWD}/mariadb/:/var/lib/mysql/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user