-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dee0ee
commit dfa2f69
Showing
19 changed files
with
131 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
target | ||
dockerfile | ||
.dockerignore | ||
.git | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POSTGRES_DB=podcast | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=postgres |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
web: | ||
build: | ||
context: . | ||
dockerfile: dockerfile | ||
volumes: | ||
- media_volume:/usr/app/podcasts | ||
depends_on: | ||
- db | ||
expose: | ||
- 5150 | ||
db: | ||
image: postgres:16.4 | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
env_file: | ||
- .env.db | ||
nginx: | ||
build: ./nginx | ||
volumes: | ||
- media_volume:/usr/app/podcasts | ||
ports: | ||
- '3969:80' | ||
depends_on: | ||
- web | ||
volumes: | ||
postgres_data: | ||
media_volume: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM rust:1.74-slim as builder | ||
|
||
WORKDIR /usr/src/ | ||
|
||
COPY . . | ||
|
||
RUN cargo build --release | ||
|
||
FROM debian:bookworm-slim | ||
|
||
WORKDIR /usr/app | ||
|
||
COPY --from=builder /usr/src/config /usr/app/config | ||
COPY --from=builder /usr/src/target/release/podcast_loco-cli /usr/app/podcast_loco-cli | ||
|
||
RUN mkdir /usr/app/podcasts | ||
|
||
ENTRYPOINT ["/usr/app/podcast_loco-cli", "-e", "production", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM nginx:1.27 | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY default.conf /etc/nginx/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# server { | ||
# listen 80; | ||
# server_name ~^(?<subdomain>\w*)\.localhost$; | ||
|
||
# location / { | ||
# if ($http_x_subdomain = "") { | ||
# set $http_x_subdomain $subdomain; | ||
# } | ||
# proxy_set_header X-Subdomain $http_x_subdomain; | ||
# proxy_pass http://localhost:5150/; | ||
# } | ||
# } | ||
|
||
upstream web { | ||
server web:5150; | ||
} | ||
|
||
|
||
server { | ||
listen 80; | ||
client_max_body_size 250M; | ||
|
||
location / { | ||
proxy_pass http://web; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
location /audio { | ||
alias /usr/app/podcasts; | ||
|
||
autoindex on; | ||
types { | ||
mp3 audio/mpeg; | ||
m4a audio/mp4; | ||
ogg audio/ogg; | ||
opus audio/ogg; | ||
flac audio/flac; | ||
wav audio/wav; | ||
} | ||
|
||
add_header Accept-Ranges bytes; | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
pub mod auth; | ||
pub mod notes; | ||
pub mod user; | ||
|
||
pub mod podcast; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
pub mod prelude; | ||
|
||
pub mod notes; | ||
pub mod podcasts; | ||
pub mod users; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.1 | ||
pub use super::notes::Entity as Notes; | ||
pub use super::podcasts::Entity as Podcasts; | ||
pub use super::users::Entity as Users; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pub mod _entities; | ||
pub mod notes; | ||
pub mod users; | ||
pub mod podcasts; |
This file was deleted.
Oops, something went wrong.