Skip to content

Commit 46e065a

Browse files
committed
okay fixed docker file to listen on correct port
1 parent 99522a2 commit 46e065a

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,5 @@ dmypy.json
139139
.pyre/
140140

141141
# End of https://www.gitignore.io/api/macos,python
142+
143+
.env

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ RUN pip install --no-cache-dir -r requirements.txt
66

77
COPY jumpstart jumpstart
88

9-
EXPOSE 5000
9+
EXPOSE 8080
1010

1111
RUN useradd jumpstart
1212
RUN chown jumpstart /usr/local/jumpstart
1313
RUN mkdir -p /usr/local/var
1414
RUN chown jumpstart:jumpstart /usr/local/var
1515
USER jumpstart
1616

17-
CMD ["gunicorn", "jumpstart:app"]
17+
CMD ["sh", "-c", "gunicorn jumpstart:app --bind=0.0.0.0:8080 --access-logfile - --error-log - --capture-output --timeout=600"]

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,36 @@ See it live [here](https://jumpstart.csh.rit.edu)!
99
This project uses [Python](http://nodejs.org), [Flask](https://npmjs.com), SQL, HTML/CSS, and Javascript.
1010

1111
1. Clone and cd into the repo: `git clone https://github.com/ComputerScienceHouse/Jumpstart`
12-
2. Run `pip install -r requirements.txt`
12+
2. Run `pip install -r requirements.txt` (or use docker)
1313
3. Ask opcomm for secrets
14-
- The secrets package follows the directory structure:
15-
src/
16-
secrets/
17-
client_secrets.json
18-
4. Run `flask --app jumpstart run`
14+
- Google clients secret json
15+
- Jumpstart API keys (runs without this... not entirely sure what it does)
16+
4. Run `flask --app jumpstart run` (please use docker)
1917
5. Results
2018

2119
Jumpstart expects the following environment variables to be defined:
2220
```
23-
FLASK_APP=jumpstart:App
2421
JUMPSTART_API_KEYS=KEYS
2522
TZ=TIMEZONE
2623
SENTRY_DSN=LINK
24+
GOOGLE_CLIENT_SECERTS_JSON=json from key file
2725
```
2826
## Docker
2927

3028
1. Ensure you are in the project root, then build the image locally with `docker built -t jumpstart .`
3129
2. Run with the following: (Be sure to update env variables)
3230
```
3331
docker run \
34-
-e FLASK_RUN_HOST=0.0.0.0 \
35-
-e FLASK_APP=jumpstart:App \
3632
-e JUMPSTART_API_KEYS=KEYS \
3733
-e TZ=America/New_York \
3834
-e SENTRY_DSN=LINK \
39-
-e GUNICORN_CMD_ARGS="-b=0.0.0.0:5000" \
40-
-v ./secrets:/usr/local/jumpstart/secrets \
41-
-p 5000:5000 \
35+
-p 8080:8080 \
4236
jumpstart
43-
```
37+
```
38+
3. You can also use a `.env` file:
39+
```
40+
docker run \
41+
--env-file='.env'
42+
-p 8080:8080
43+
jumpstart
44+
```

0 commit comments

Comments
 (0)