Skip to content

Commit 724dca0

Browse files
authored
fix dockerfile and add compose example (#5)
* Add docker-compose configuration for youtube-tldr service * Add build.rs to Dockerfile build.rs was not being copied into the Docker container. This file is responsible for compressing the static assets (creating the .gz files) that main.rs expects to include during compilation.
1 parent 70af129 commit 724dca0

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ WORKDIR /YouTubeTLDR
77

88
COPY ./Cargo.toml ./Cargo.toml
99
COPY ./Cargo.lock ./Cargo.lock
10+
COPY ./build.rs ./build.rs
1011

1112
COPY ./src ./src
1213
COPY ./static ./static

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
youtube-tldr:
3+
build: .
4+
image: youtube-tldr:latest
5+
container_name: youtube-tldr
6+
ports:
7+
- "8000:8000"
8+
environment:
9+
- TLDR_IP=0.0.0.0
10+
- TLDR_PORT=8000
11+
- TLDR_WORKERS=1
12+
restart: unless-stopped

0 commit comments

Comments
 (0)