forked from julsbreakdown/docker
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f6a25e
commit ff25067
Showing
11 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Build images for trainings | ||
|
||
on: | ||
# trigger only on push to dev branch | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build-and-push: | ||
if: github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to GitHub Container Registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Build and push to ghcr | ||
run: | | ||
cd m03_developer/ | ||
docker build -t ghcr.io/camptocamp/courseware-containers-m03:monolith \ | ||
--pull --no-cache \ | ||
--label GIT_COMMIT=$(git rev-parse HEAD) . | ||
docker push ghcr.io/camptocamp/courseware-containers-m03:monolith | ||
docker build -t ghcr.io/camptocamp/courseware-containers-m03:static \ | ||
-f Dockerfile.static \ | ||
--pull --no-cache \ | ||
--label GIT_COMMIT=$(git rev-parse HEAD) . | ||
docker push ghcr.io/camptocamp/courseware-containers-m03:monolith |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.12-bookworm | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
#ENV FLASK_APP=app.py | ||
|
||
RUN pip install gunicorn | ||
|
||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ["gunicorn", "--bind=0.0.0.0"] | ||
CMD ["app:app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM nginx:1 | ||
|
||
RUN mkdir /usr/share/nginx/html/static/ | ||
COPY static/* /usr/share/nginx/html/static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from flask import Flask, render_template | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/') | ||
def home(): | ||
return render_template('index.html') | ||
|
||
if __name__ == "__main__": | ||
app.run(debug=True, host='0.0.0.0', port=5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python Debugger: Flask", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "flask", | ||
"env": { | ||
"FLASK_APP": "app.py", | ||
"FLASK_DEBUG": "1", | ||
"PGHOST": "localhost", | ||
}, | ||
"args": [ | ||
"run", | ||
], | ||
"jinja": true, | ||
"autoStartBrowser": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Flask | ||
debugpy |
10 changes: 10 additions & 0 deletions
10
m03_developer/monolith/static/Ghastly_Panic_Font_Info_and_ReadMe.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Ghastly Panic Font by Chad Savage | ||
http://www.sinisterfonts.com | ||
|
||
Created 2005, hand-lettered while watching the 2004 remake of "Dawn of the Dead". | ||
|
||
This is a free font, and I mean FREE. Use it however you want, for whatever you want. If you make something cool with it, I'd love to see it - email me at [email protected] and tell me about it. If you offer it for download on your own font site, PLEASE include this Read Me. That's not too much to ask, is it? | ||
|
||
This font is intended for specialty and graphic uses. It will look just awful if used in a paragraph format. | ||
|
||
For more free fonts and other downloadable goodies, visit http://www.sinisterfonts.com. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@font-face { | ||
font-family: 'Ghastly Panic'; | ||
src: url('./ghastly_panic.ttf') format('truetype'); | ||
} | ||
|
||
html { | ||
font-size: 16pt; | ||
height: 100%; | ||
} | ||
body { | ||
min-height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
position: relative; | ||
} | ||
.greetings { | ||
font-size: 70px; | ||
color: white; | ||
border: 2px solid black; | ||
text-align: center; | ||
background: black; | ||
margin-top: 0; | ||
font-family: 'Ghastly Panic', sans-serif; | ||
letter-spacing: 7px; | ||
padding: 20px 0 20px 0; | ||
} | ||
.cameraImage { | ||
margin: auto; | ||
display: block; | ||
position: relative; | ||
top: 100px; | ||
} | ||
footer { | ||
background-color: black; | ||
color: white; | ||
padding: 20px 0; | ||
text-align: center; | ||
position: absolute; | ||
bottom: 0; | ||
font-family: sans-serif; | ||
width: 100%; | ||
} | ||
|
||
footer a { | ||
color: #ecf0f1; | ||
text-decoration: none; | ||
margin: 0 15px; | ||
} | ||
|
||
footer a:hover { | ||
color: #f39c12; | ||
} | ||
|
||
.footer-content { | ||
max-width: 1000px; | ||
margin: 0 auto; | ||
} | ||
|
||
.social-media { | ||
margin-top: 10px; | ||
} | ||
|
||
.social-media a { | ||
margin: 0 10px; | ||
font-size: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>The Horror Movies</title> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | ||
</head> | ||
<body> | ||
<h1 class="greetings">The Horror Movies</h1> | ||
<img class="cameraImage" src="{{ url_for('static', filename='camera.png') }}"> | ||
<footer> | ||
<div class="footer-content"> | ||
<p>© 2024 Created with vim.</p> | ||
<div class="social-media"> | ||
<a href="#">Facebook</a> | ||
<a href="#">Twitter</a> | ||
<a href="#">Instagram</a> | ||
<a href="#">LinkedIn</a> | ||
</div> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> |