Skip to content

Commit

Permalink
fix(docker): disable deno compile & update compose files configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 committed Apr 28, 2024
1 parent e553958 commit d4561ea
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ NAMESPACE="UUID"
TMDB_KEY="TMDB_KEY"

TRAKT_ID="TRAKT_ID"
TRAKT_KEY="TRAKT_KEY"

GROWTH_KEY="GROWTH_KEY"

Expand All @@ -22,8 +21,6 @@ TRAKT="TRAKT"

OPTIC_MIN_LEVEL=DEBUG

PRODUCTION=false

UPSTASH_REDIS_REST_URL="UPSTASH_REDIS_REST_URL"
UPSTASH_REDIS_REST_TOKEN="UPSTASH_REDIS_REST_TOKEN"

Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ RUN apt-get install unzip
FROM scaffold AS cache
RUN deno cache src/index.ts

FROM cache AS build
RUN deno compile --allow-net --allow-env --allow-read --output=server src/index.ts
# Complilation broken in the latest version of deno
# FROM cache AS final
# RUN deno compile --allow-net --allow-env --allow-read --output=server src/index.ts

ENTRYPOINT ["/usr/app/server"]
#ENTRYPOINT ["/usr/app/server"]

ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "src/index.ts"]
9 changes: 5 additions & 4 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ services:
- default
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.anitrend-edge.rule=Host(`edge.docker.localhost`)"
- "traefik.enable=${TRAEFIK_ENABLE}"
- "traefik.http.routers.anitrend-edge.rule=Host(`${HOST}`)"
- "traefik.http.routers.anitrend-edge.entrypoints=web,websecure"
- "traefik.http.routers.anitrend-edge.service=anitrend-edge"
- "traefik.http.routers.anitrend-edge.tls=true"
- "traefik.http.routers.anitrend-edge.tls.certresolver=staging"
- "traefik.http.services.anitrend-edge.loadbalancer.server.port=9800"
- "traefik.http.routers.anitrend-edge.tls.certresolver=${CERT_RESOLVER}"
- "traefik.http.services.anitrend-edge.loadbalancer.server.port=${PORT}"
restart: unless-stopped

networks:
default:
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ services:
networks:
- default
env_file: .env
labels:
- "traefik.enable=${TRAEFIK_ENABLE}"
- "traefik.http.routers.anitrend-edge.rule=Host(`${HOST}`)"
- "traefik.http.routers.anitrend-edge.entrypoints=web,websecure"
- "traefik.http.routers.anitrend-edge.service=anitrend-edge"
- "traefik.http.routers.anitrend-edge.tls=true"
- "traefik.http.routers.anitrend-edge.tls.certresolver=${CERT_RESOLVER}"
- "traefik.http.services.anitrend-edge.loadbalancer.server.port=${PORT}"
restart: unless-stopped

networks:
default:
Expand Down

0 comments on commit d4561ea

Please sign in to comment.