Compare commits

...

7 commits

Author SHA1 Message Date
Vitaliy
68e4fb7a71
Merge 6d857ffc49 into c204a54815 2025-01-15 16:53:09 -05:00
Ategon
c204a54815 Adjust request to be https 2025-01-15 16:42:56 -05:00
Ategon
2b3d1f08fa Merge branch 'main' of https://github.com/Ategon/Jamjar 2025-01-15 16:35:23 -05:00
Ategon
3b0d74f21f Adjust ports 2025-01-15 16:35:21 -05:00
Benjamin Barbeau
126826b749
Update README.md 2025-01-15 14:09:37 -05:00
Benjamin Barbeau
fe3ac9d48a
Update README.md 2025-01-15 14:08:12 -05:00
Ategon
9d457750db Add docker support 2025-01-15 14:05:38 -05:00
7 changed files with 40 additions and 4 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"]

View file

@ -2,4 +2,15 @@
Frontend for a game jam site
Under construction currently, I just quickly slapped together a splash page in 30 mins to show instead of the usual site progress and it will slowly get added back and polished over time
To run using next.js (for development)
```
npm i
npm run dev
```
To run using docker and docker compose
```
docker compose up --build -d
```

9
docker-compose.yml Normal file
View file

@ -0,0 +1,9 @@
version: "3.8"
services:
nextjs-app:
build:
context: .
ports:
- "127.0.0.1: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

@ -9,7 +9,7 @@ export default function Posts() {
useEffect(() => {
const fetchPosts = async () => {
const response = await fetch("http://localhost:3005/api/v1/posts");
const response = await fetch("https://jam.edikoyo.com/api/v1/posts");
setPosts(await response.json());
};

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());