Skip to content

Commit ae80629

Browse files
authored
Merge pull request #57 from Evolutionary-Algorithms-On-Click/56-containerize-frontend-add-docker-compose-script
Add Docker support with Dockerfile and docker-compose script.
2 parents d923699 + 33ed8ee commit ae80629

File tree

7 files changed

+158
-106
lines changed

7 files changed

+158
-106
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Dockerfile
2+
.dockerignore
3+
node_modules
4+
npm-debug.log
5+
README.md
6+
.next
7+
.git

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
main-workflow:
10+
uses: Evolutionary-Algorithms-On-Click/operations/.github/workflows/docker-publish.yml@main
11+
with:
12+
branch: ${{ github.ref }}
13+
image_name: ${{ github.repository }}
14+
event_name: ${{ github.event_name }}
15+
permissions:
16+
contents: read
17+
packages: write
18+
id-token: write

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:latest
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
RUN npm install
8+
RUN npm run build
9+
EXPOSE 3000
10+
CMD ["npm", "start"]

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
evolve_frontend:
3+
image: ghcr.io/evolutionary-algorithms-on-click/evolve_frontend:main
4+
# Comment the above line and uncomment the following lines
5+
# to build the image from the Dockerfile locally.
6+
# build:
7+
# context: .
8+
# dockerfile: Dockerfile
9+
environment:
10+
- NEXT_PUBLIC_BACKEND_BASE_URL=${NEXT_PUBLIC_BACKEND_BASE_URL}
11+
- NEXT_PUBLIC_AUTH_BASE_URL=${NEXT_PUBLIC_AUTH_BASE_URL}
12+
- NEXT_PUBLIC_MINIO_BASE_URL=${NEXT_PUBLIC_MINIO_BASE_URL}
13+
- NEXT_PUBLIC_AI=${NEXT_PUBLIC_AI}
14+
- GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
15+
ports:
16+
- "3000:3000"

next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
images: {
4+
unoptimized: true,
45
domains: ["localhost", "github.com"],
56
// remotePatterns: [
67
// {

package-lock.json

Lines changed: 105 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"ai": "^4.2.8",
2121
"eslint-config-next": "^15.2.0",
2222
"lucide-react": "^0.476.0",
23-
"next": "^15.2.0",
23+
"next": "^15.2.4",
2424
"react": "^19.0.0",
2525
"react-dom": "^19.0.0",
2626
"react-dropzone": "^14.2.10",

0 commit comments

Comments
 (0)