File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ def get_tcp_connection_string():
61
61
62
62
Then we can use this function in the ` app/__init__.py `
63
63
64
+ _ app/__ init__ .py_
65
+
64
66
``` python
65
67
from flask import Flask
66
68
from flask_sqlalchemy import SQLAlchemy
@@ -114,6 +116,8 @@ To build the container you need a `Dockerfile`. The Dockerfile will tell Docker
114
116
115
117
This ` Dockerfile ` starts from a pre-made image (Python slim buster in this example) and adds any needed files/configurations.
116
118
119
+ _ Dockerfile_
120
+
117
121
``` Dockerfile
118
122
# Starter image
119
123
FROM python:3.9-slim-buster
@@ -206,6 +210,8 @@ Just like before we can create a script to run the container as well. We give t
206
210
207
211
We are adding environment variables to the container to tell our app how to connect to our database.
208
212
213
+ _ scripts/docker_run.sh_
214
+
209
215
``` bash
210
216
#! /bin/bash
211
217
You can’t perform that action at this time.
0 commit comments