diff --git a/docker-compose.yml b/docker-compose.yml index 1dae3ed..7a8c9a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,3 +9,5 @@ services: volumes: # when pushing to server, remove the first dot here in front of /mnt - /mnt/ssd/ds_ftp/classla_OS2022:/usr/src/app/classla_OS2022 - ./swagger_server/classla/classla_resources:/root/classla_resources + environment: + - PYTHONUNBUFFERED=1 diff --git a/swagger_server/__main__.py b/swagger_server/__main__.py index 0517f86..4a7ddc9 100644 --- a/swagger_server/__main__.py +++ b/swagger_server/__main__.py @@ -4,6 +4,7 @@ import connexion from swagger_server import encoder +print("We in main file") def main(): print("Starting app1") @@ -16,8 +17,6 @@ def main(): app.run(port=8080) -# need to comment out the bottom part and add this because -# for some reason it won't run otherwise on the docker on the server -main() -# if __name__ == '__main__': -# main() +if __name__ == '__main__': + print("Starting main function") + main()