Skip to content

Commit

Permalink
Wildcard remotePatterns
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Saxena committed Aug 20, 2024
1 parent 2764b79 commit e42bda2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
1 change: 0 additions & 1 deletion apps/web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# Usage guide: https://medialit.cloud/blog/apps-and-api-key/Pul-Qpsc4EtMj0iFefj5V
# MEDIALIT_APIKEY=medialit_apikey
# MEDIALIT_SERVER=medialit_server
# MEDIALIT_CDN=medialit_cdn

# For carrying out tasks asynchronously.
#
Expand Down
14 changes: 1 addition & 13 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,10 @@
const remotePatterns = [
{
protocol: "https",
hostname: "medialit-prod.s3.ap-southeast-1.amazonaws.com",
},
{
protocol: "https",
hostname: "d27g932tzd9f7s.cloudfront.net",
hostname: "**",
},
];

if (process.env.MEDIALIT_SERVER && process.env.MEDIALIT_CDN) {
for (const hostname of process.env.MEDIALIT_CDN.split(",")) {
remotePatterns.push({
hostname: hostname.trim(),
});
}
}

const nextConfig = {
output: "standalone",
reactStrictMode: true,
Expand Down
5 changes: 0 additions & 5 deletions deployment/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ services:
# at https://medialit.cloud. You can self host it as well.
# - MEDIALIT_APIKEY=${MEDIALIT_APIKEY}
# - MEDIALIT_SERVER=https://api.medialit.cloud
#
# CourseLit is based on Next.js. Next.js has to be aware of all the remote servers
# where the images are going to be served from. If you are self hosting MediaLit, add
# the service's CDN URL below.
# - MEDIALIT_CDN=${MEDIALIT_CDN}

expose:
- "${PORT:-80}"
Expand Down
4 changes: 3 additions & 1 deletion services/app/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules
.env
.env.local

0 comments on commit e42bda2

Please sign in to comment.