Skip to content

Commit c7a16f4

Browse files
committed
Revert back to existing volume setup
1 parent f8abc19 commit c7a16f4

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

backend/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ENV LIBRARY_PATH=/lib:/usr/lib LD_LIBRARY_PATH=/lib:/usr/lib
7272

7373
RUN apt-get update -y && apt-get install -y curl
7474

75-
RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR} && mkdir -p /tmp/pycon && chown -R app:app /tmp/pycon
75+
RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR}
7676

7777
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/
7878
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/widgets/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/widgets/
@@ -83,8 +83,6 @@ COPY --chown=app:app . ${FUNCTION_DIR}
8383

8484
USER app
8585

86-
VOLUME ["/tmp/pycon"]
87-
8886
RUN mkdir -p assets && .venv/bin/python manage.py collectstatic --noinput
8987

9088
ENTRYPOINT ["/home/app/.venv/bin/gunicorn"]

backend/video_uploads/transfer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def __init__(
5555
self.merged_file = None
5656

5757
def run(self) -> list[str]:
58-
os.makedirs("/tmp/pycon/", exist_ok=True)
59-
6058
self.storage = storages["default"]
6159
self.s3_client = self._get_s3_client()
6260
self.download_link = self.get_download_link()
@@ -188,7 +186,7 @@ def merge_parts(self, parts: list[str]):
188186

189187
self.merged_file = tempfile.NamedTemporaryFile(
190188
"wb",
191-
prefix=f"/tmp/pycon/wetransfer_{self.wetransfer_to_s3_transfer_request.id}",
189+
prefix=f"wetransfer_{self.wetransfer_to_s3_transfer_request.id}",
192190
suffix=self.extension,
193191
delete=False,
194192
)
@@ -209,7 +207,7 @@ def download_part(self, part_info: PartInfo) -> str:
209207

210208
part_file = tempfile.NamedTemporaryFile(
211209
"wb",
212-
prefix=f"/tmp/pycon/wetransfer_{self.wetransfer_to_s3_transfer_request.id}.part{part_info.part_number}",
210+
prefix=f"wetransfer_{self.wetransfer_to_s3_transfer_request.id}.part{part_info.part_number}",
213211
suffix=self.extension,
214212
delete=False,
215213
)

infrastructure/applications/pycon_backend/worker_heavy_processing.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "aws_ecs_task_definition" "heavy_processing_worker" {
3434

3535
mountPoints = [
3636
{
37-
"containerPath" = "/tmp/pycon/"
37+
"containerPath" = "/tmp/"
3838
"sourceVolume" = "storage"
3939
"readOnly" = false
4040
}

0 commit comments

Comments
 (0)