Skip to content

Commit

Permalink
Merge pull request #895 from Agenta-AI/installation_agenta
Browse files Browse the repository at this point in the history
Installation_agenta
  • Loading branch information
mmabrouk authored Nov 14, 2023
2 parents 0fe48b3 + 964c1df commit fabdad2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
id: build-web-image
run: |
cd agenta-web
docker build --no-cache -t ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }} -f prod.Dockerfile .
docker build --no-cache -t ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }} -f prod.gh.Dockerfile .
docker push ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }}
21 changes: 21 additions & 0 deletions agenta-web/prod.gh.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:18-alpine

WORKDIR /app

# Install only production dependencies
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev

# Copy only necessary files
COPY src ./src
COPY public ./public
COPY next.config.js .
COPY tsconfig.json .
COPY postcss.config.js .
# used in cloud
COPY sentry.* .
# Build the Next.js app for production
RUN npm run build

# Start the production server
CMD ["npm", "start"]
8 changes: 5 additions & 3 deletions docker-compose.gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
environment:
- MONGODB_URI=mongodb://username:password@mongo:27017
- ENVIRONMENT=development
- BARE_DOMAIN_NAME=localhost
- DOMAIN_NAME=http://localhost
- BARE_DOMAIN_NAME=${BARE_DOMAIN_NAME:-localhost}
- DOMAIN_NAME=${DOMAIN_NAME:-http://localhost}
- FEATURE_FLAG=oss
command:
[
Expand Down Expand Up @@ -62,7 +62,9 @@ services:
- "traefik.http.services.agenta-web.loadbalancer.server.port=3000"
environment:
- NEXT_PUBLIC_POSTHOG_API_KEY=phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7

- NEXT_PUBLIC_AGENTA_API_URL=${DOMAIN_NAME:-http://localhost}
- NEXT_PUBLIC_FF=oss
- NEXT_PUBLIC_TELEMETRY_TRACKING_ENABLED=true
mongo:
image: mongo:5.0
environment:
Expand Down

0 comments on commit fabdad2

Please sign in to comment.