Add docker support

This commit is contained in:
Ategon 2025-01-15 14:05:38 -05:00
parent 7f5c15ab2f
commit 9d457750db
5 changed files with 27 additions and 2 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
.next
node_modules

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM node:18-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

9
docker-compose.yml Normal file
View file

@ -0,0 +1,9 @@
version: "3.8"
services:
nextjs-app:
build:
context: .
ports:
- "3004:3000"
environment:
NODE_ENV: production

View file

@ -21,7 +21,7 @@ export default function Navbar() {
href="/"
className="duration-500 ease-in-out transition-all transform hover:scale-110"
>
<Image src="/images/edikoyo.png" width={160} />
<Image src="/images/edikoyo.png" alt="Edikoyo logo" width={160} />
</Link>
</NavbarBrand>
<NavbarContent>

View file

@ -6,7 +6,7 @@ export default function Timer({
name,
targetDate,
}: {
name: String;
name: string;
targetDate: Date;
}) {
const [timeLeft, setTimeLeft] = useState(targetDate.getTime() - Date.now());