Skip to content

Commit e2e6cab

Browse files
committed
Adds Dockerfile for easy setup
Provides a Dockerfile for containerizing the application. Updates the README with instructions on how to build and run the application in a Docker container.
1 parent 6268cdb commit e2e6cab

File tree

3 files changed

+87
-1
lines changed

3 files changed

+87
-1
lines changed

.dockerignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Dependencies
2+
node_modules
3+
**/node_modules
4+
.pnp
5+
.pnp.js
6+
7+
# Testing
8+
coverage
9+
**/coverage
10+
11+
# Production builds
12+
dist
13+
**/dist
14+
build
15+
**/build
16+
17+
# Cache directories
18+
.cache
19+
**/.cache
20+
.npm
21+
.eslintcache
22+
.vite
23+
.nx
24+
**/.parcel-cache
25+
26+
# Environment files
27+
.env.*
28+
!.env.example
29+
30+
# IDE specific files
31+
.idea
32+
.vscode
33+
*.swp
34+
*.swo
35+
36+
# OS specific files
37+
.DS_Store
38+
Thumbs.db
39+
40+
# Logs
41+
logs
42+
*.log
43+
npm-debug.log*
44+
yarn-debug.log*
45+
yarn-error.log*
46+
47+
# Temporary files
48+
*.tmp
49+
*.temp

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use an official Node.js runtime as a parent image
2+
FROM node:20-alpine
3+
4+
# Set the working directory
5+
WORKDIR /app
6+
7+
# Copy the rest of the application code
8+
COPY . .
9+
10+
# Install dependencies
11+
RUN npm i
12+
RUN npm i -g http-server
13+
14+
RUN npm run plugins:build
15+
16+
RUN echo -e "npx nx reset\nnpm run client:build\nhttp-server -p 80 packages/client/dist" > ./start.sh
17+
RUN chmod +x ./start.sh
18+
19+
EXPOSE 80
20+
21+
CMD ["sh", "./start.sh"]

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,20 @@ All the packages are located in the `packages` directory structured as follows:
2020
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).
2121

2222
## License
23-
This project is licensed under the MIT license - see the LICENSE.md file for details.
23+
This project is licensed under the MIT license - see the LICENSE.md file for details.
24+
25+
## Docker
26+
To run the STAC-Manager in a Docker container, you can use the provided Dockerfile.
27+
28+
**Build the Docker image**
29+
```bash
30+
docker build -t stac-manager .
31+
```
32+
33+
**Run the Docker container**
34+
```bash
35+
docker run --rm -p 8080:80 --name stac-manager -e 'PUBLIC_URL=http://your-url.com' stac-manager
36+
```
37+
38+
> [!NOTE]
39+
> 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.

0 commit comments

Comments
 (0)