Skip to content

Commit

Permalink
Change file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
iancaragol committed Jan 30, 2022
1 parent 96bc9ce commit ecb3489
Show file tree
Hide file tree
Showing 59 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
praw.ini
credentials.txt
apikey.txt
apikey.txt
*.env
Binary file removed __pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed __pycache__/app.cpython-36.pyc
Binary file not shown.
Binary file removed __pycache__/display.cpython-36.pyc
Binary file not shown.
Binary file removed __pycache__/flask_app.cpython-36.pyc
Binary file not shown.
Binary file removed __pycache__/onebusaway.cpython-37.pyc
Binary file not shown.
Binary file removed __pycache__/uta_bus.cpython-36.pyc
Binary file not shown.
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.9'

services:
# Backend Service
backend:
container_name: backend
env_file:
- ./config.env
restart: always
build: ./src/
ports:
- "5000:5000"
volumes:
- ./src/:/home/app/
command: setup.py -s backend
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions src/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Main docker image to be built
FROM python:3.9.4-slim

RUN adduser nonroot
RUN mkdir /home/app/ && chown -R nonroot:nonroot /home/app
WORKDIR /home/app

COPY --from=build /wheels /wheels
COPY --chown=nonroot:nonroot requirements.txt /home/app/
RUN pip3 install -r requirements.txt -f /wheels \
&& rm -rf /wheels \
&& rm -rf /root/.cache/pip/* \
&& rm requirements.txt

USER nonroot

# Feyre.py
COPY --chown=nonroot:nonroot . /home/app/

ENTRYPOINT [ "python" ]
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ecb3489

Please sign in to comment.