Skip to content

Commit

Permalink
Clean up. Move zip to tmp directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac committed Sep 25, 2024
1 parent 0d2919e commit 947d720
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ COPY . /app
COPY ./requirements.txt /requirements.txt

# RUN chmod +x load_fixtures.sh works when i pull the dockerfile into backend but not when dockerfile is with other docker files
# RUN chmod +x /app
RUN chmod +wx /app
RUN chmod +x /app

# RUN python3 -m pip install -r requirements.txt

Expand Down
3 changes: 0 additions & 3 deletions backend/gwells/data_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ def border_data(apps, schema_editor):
tmp_path = '/tmp/BCGW_ABMS_PROV-migrations/'

zip_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'migrations/BCGW_ABMS_PROV.zip')
print(f"ZipPATH: {zip_path}")

print(f"<<<<------>>>>>>>>current working directory: {os.getcwd()}")

with ZipFile(zip_path, 'r') as zipObj:
zipObj.extractall(tmp_path)
Expand Down
3 changes: 1 addition & 2 deletions backend/wells/management/commands/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ def handle(self, *args, **options):
:param args: django managed args
:param options: django managed options
"""
print("Current Working Directory - GWELLS.zip: ", os.getcwd(), flush=True)
logger.info('starting export')
zip_filename = 'gwells.zip'
zip_filename = '/tmp/gwells.zip'
spreadsheet_filename = 'gwells.xlsx'
for version_desc in self.versioning_descriptor:
version = version_desc['version']
Expand Down

0 comments on commit 947d720

Please sign in to comment.