Skip to content

Adds Dockerfile for easy setup #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
49 changes: 49 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Dependencies
node_modules
**/node_modules
.pnp
.pnp.js

# Testing
coverage
**/coverage

# Production builds
dist
**/dist
build
**/build

# Cache directories
.cache
**/.cache
.npm
.eslintcache
.vite
.nx
**/.parcel-cache

# Environment files
.env.*
!.env.example

# IDE specific files
.idea
.vscode
*.swp
*.swo

# OS specific files
.DS_Store
Thumbs.db

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Temporary files
*.tmp
*.temp
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an official Node.js runtime as a parent image
FROM node:20-alpine

# Set the working directory
WORKDIR /app

# Copy the rest of the application code
COPY . .

# Install dependencies
RUN npm i
RUN npm i -g http-server

RUN npm run plugins:build

RUN echo -e "npx nx reset\nnpm run client:build\nhttp-server -p 80 packages/client/dist" > ./start.sh
RUN chmod +x ./start.sh

EXPOSE 80

CMD ["sh", "./start.sh"]
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,20 @@ All the packages are located in the `packages` directory structured as follows:
To set up the project for development, follow the instructions in the [development documentation](./DEVELOPMENT.md) and get familiar with the app architecture and the plugin system by reading the [technical documentation](./docs/README.md).

## License
This project is licensed under the MIT license - see the LICENSE.md file for details.
This project is licensed under the MIT license - see the LICENSE.md file for details.

## Docker
To run the STAC-Manager in a Docker container, you can use the provided Dockerfile.

**Build the Docker image**
```bash
docker build -t stac-manager .
```

**Run the Docker container**
```bash
docker run --rm -p 8080:80 --name stac-manager -e 'PUBLIC_URL=http://your-url.com' stac-manager
```

> [!NOTE]
> The application performs a complete build during container startup to ensure environment variables are properly integrated. This process may take a couple minutes to complete.