Skip to content

Commit 8745971

Browse files
committed
home.html runs!!!!
Nothing else works yet and that is okay. I need to just get some base html pages working first. The rest is to come.
1 parent 006e780 commit 8745971

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

Dockerfile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
# Base image
2-
FROM python:3.9-slim
2+
FROM python:3.9.21-bookworm
33

4-
# Install dependencies
4+
# Set working directory
55
WORKDIR /app
6+
7+
# Copy requirements and install dependencies
68
COPY requirements.txt .
79
RUN pip install -r requirements.txt
810

9-
# Copy app
10-
COPY * .
11-
12-
# Expose Flask port
13-
EXPOSE 8082
14-
15-
16-
# Set the environment variable for Flask
17-
ENV FLASK_APP=app.py
11+
# Copy application code
12+
COPY . .
1813

19-
# Run the Flask server
20-
CMD ["flask", "run", "--host=0.0.0.0", "--port=8082"]
14+
# Expose port and run Flask
15+
EXPOSE 5000
16+
CMD ["python3", "-m", "flask", "run", "--host=0.0.0.0"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ THIS IS AN ALPHA SOFTWARE!
88

99

1010
1. Build the container: `docker build -t webgsm .`
11-
2. Run the Container: `docker run -d -p 8082:8082 -v /var/run/docker.sock:/var/run/docker.sock webgsm`
12-
3. Access the Web App: Open a browser and go to `http://localhost:8082/frontend/index.html`
11+
2. Run the Container: `docker run -d -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock webgsm`
12+
3. Access the Web App: Open a browser and go to `http://localhost:5000/frontend/index.html`
1313

1414
Notes:
1515
The `-v /var/run/docker.sock:/var/run/docker.sock` part allows the container to manage Docker on the host. This is powerful but risky—use with care.

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ def home():
77
return render_template('home.html')
88

99
if __name__ == '__main__':
10-
app.run(host='0.0.0.0', port=8082)
10+
app.run(debug='True', host='0.0.0.0', port=8082)

filedocker

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Base image
2+
FROM python:3.9-slim
3+
4+
# Install dependencies
5+
WORKDIR /app
6+
COPY requirements.txt .
7+
RUN pip install -r requirements.txt
8+
9+
# Copy app
10+
COPY * .
11+
12+
# Expose Flask port
13+
EXPOSE 8082
14+
15+
16+
# Set the environment variable for Flask
17+
ENV FLASK_APP=app.py
18+
19+
# Run the Flask server
20+
CMD ["flask", "run", "--host=0.0.0.0", "--port=8082"]

0 commit comments

Comments
 (0)