Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
node_modules/
dist/
build/
.git/
.github/
.lighthouseci/
.vscode/
.idea/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.env
.env.*
Dockerfile
docker-compose.yml
README.md
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Stage 1: Build the React application
FROM node:22-alpine AS build

WORKDIR /app

# Copy package files and install dependencies
COPY package*.json ./
RUN npm ci

# Copy the rest of the application source code
COPY . .

# Build the application for production
RUN npm run build

# Stage 2: Serve the application using Nginx
FROM nginx:stable-alpine

# Copy the build output to Nginx HTML directory
COPY --from=build /app/dist /usr/share/nginx/html

# Copy custom Nginx configuration for client-side routing support
COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost/ || exit 1

CMD ["nginx", "-g", "daemon off;"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,30 @@ We welcome contributions from developers, designers, and open-source enthusiasts
- Pull request guidelines
- Community communication

## 🐳 Docker Support

You can run OrgExplorer in a containerized environment using Docker or Docker Compose. This is useful for self-hosting in your own infrastructure.

### Build and Run with Docker Compose (Recommended)

1. Build and start the container:
```bash
docker compose up --build -d
```
2. Access the application in your browser at http://localhost:8080.

### Build and Run with Docker CLI

1. Build the Docker image:
```bash
docker build -t orgexplorer .
```
2. Run the container:
```bash
docker run -d -p 8080:80 orgexplorer
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.
3. Access the application in your browser at http://localhost:8080.

## 📍 License

This project is licensed under the GNU General Public License v3.0.
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
orgexplorer:
build:
context: .
dockerfile: Dockerfile
container_name: orgexplorer-app
ports:
- "8080:80"
restart: unless-stopped
23 changes: 23 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

# Enable gzip compression for better performance
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/javascript;
gzip_disable "MSIE [1-6]\.";

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Loading