Skip to content

Commit

Permalink
Add support for setting a custom time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbaeten committed Jul 28, 2024
1 parent bace86d commit d32501e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Store these in a .env file before building & running
| `S3_ENDPOINT` | Your S3 Endpoint |
| `S3_BUCKET_NAME` | The Name of the S3 bucket you wish to store the videos in |
| `S3_ACL` | The ACL rule to apply for videos uploaded to the bucket |
| `TIMEZONE` | The timezone to use when including timestamps in the filenames [List](https://www.iana.org/time-zones) |

## Deployment
Follow these steps to deploy this on your machine
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ services:
dockerfile: Dockerfile
args:
COOKIE: ${TIKTOK_COOKIE}
TIMEZONE: ${TIMEZONE-:Etc/UTC}
volumes:
- ./videos:/app/src/videos
environment:
- TIMEZONE=${TIMEZONE-:Etc/UTC}
- ROOM_ID=${TIKTOK_ROOM_ID}
- COOKIE=${TIKTOK_COOKIE}

Expand Down
5 changes: 4 additions & 1 deletion recorder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM python:3.10-slim

# Install git
RUN apt-get update && apt-get install -y git ffmpeg jq
RUN apt-get update && apt-get install -y git ffmpeg jq && \
ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime

# Clone the repository
WORKDIR /app
Expand All @@ -15,6 +16,8 @@ RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir -p videos

ARG COOKIE
ARG TIMEZONE
ENV TZ=${TIMEZONE}

# Use jq to create the cookies.json file
RUN echo '{"sessionid_ss": "", "tt-target-idc": "useast2a"}' | \
Expand Down

0 comments on commit d32501e

Please sign in to comment.