Skip to content

Commit

Permalink
fix: docker caching issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VineeTagarwaL-code committed Sep 28, 2024
1 parent 3a87f2b commit 8cb87ae
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
.next/
.next/
.env
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Build and push Docker image
run: |
docker build -t vineetagarwal2004/blog:${{ github.sha }} -t vineetagarwal2004/blog:latest .
docker build -t vineetagarwal2004/blog:${{ github.sha }} -t vineetagarwal2004/blog:latest . --no-cache
docker push --all-tags vineetagarwal2004/blog
- name: Deploy to EC2
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ version: '3.8'

services:
nextjs:
image: vineetagarwal2004/blog:latest
image: my-blog-app:latest
container_name: blog

ports:
- "3000:3000"
env_file:
Expand Down
6 changes: 3 additions & 3 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://blog.vineet.tech/blog</loc><lastmod>2024-09-25T21:44:32.383Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/tags</loc><lastmod>2024-09-25T21:44:32.383Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech</loc><lastmod>2024-09-25T21:44:32.383Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/tags</loc><lastmod>2024-09-28T16:23:23.761Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/blog</loc><lastmod>2024-09-28T16:23:23.762Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech</loc><lastmod>2024-09-28T16:23:23.762Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
1 change: 1 addition & 0 deletions src/app/actions/blog.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import rehypeSlug from "rehype-slug";
import { SuccessResponse } from "@/lib/success";

const getBlogs = withServerActionAsyncCatcher(async () => {
console.log("Fetching blogs");
const response = await axios.get(
`https://api.github.com/repos/${process.env.GITHUB_USERNAME}/${process.env.GITHUB_REPO_NAME}/git/trees/main?recursive=1`,
{
Expand Down
3 changes: 2 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use server";
import { Blogs } from "@/components/blogs";
import { Introduction } from "@/components/introduction";
import { getBlogs } from "./actions/blog.action";

export const revalidate = 10;
export default async function Home() {
let blogsMeta: Meta[] | undefined;
try {
Expand Down

0 comments on commit 8cb87ae

Please sign in to comment.