Skip to content
Draft
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
8 changes: 5 additions & 3 deletions examples/blogger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ Flask web service (in `web_service/`), a Vue front-end (in `www/`), a HAProxy
reverse-proxy (in `reverse_proxy/`), and a PostgreSQL database (in `db/`).

In order to run it, do:

```
$ docker compose up --build
```

In addition to the default configuration which runs a single Skip service, this
example can also run the Skip service in a distributed *leader-follower*
configuration, with one *leader* handling writes and talking to the Postgres DB,
and three *followers* which serve reactive streams to clients, sharing the load
example can also run the Skip service in a distributed _leader-follower_
configuration, with one _leader_ handling writes and talking to the Postgres DB,
and three _followers_ which serve reactive streams to clients, sharing the load
of computing and maintaining resources in a round-robin fashion.

This distributed configuration requires only configuration changes, is
transparent to clients, and can be run with:

```
$ docker compose -f compose.distributed.yml up --build
```
4 changes: 2 additions & 2 deletions examples/blogger/clean_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ process_directory() {

# Clean and install
echo -e "${YELLOW}Cleaning $dir...${NC}"
if ! npm run clean; then
if ! pnpm clean; then
echo -e "${RED}Error: Clean failed in $dir${NC}"
cd - || return 1
return 1
fi

echo -e "${YELLOW}Installing dependencies in $dir...${NC}"
if ! npm install; then
if ! pnpm install; then
echo -e "${RED}Error: Install failed in $dir${NC}"
cd - || return 1
return 1
Expand Down
9 changes: 5 additions & 4 deletions examples/blogger/reactive_service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM node:lts-alpine3.19
RUN npm install -g pnpm
WORKDIR /app
COPY package.json package.json
RUN npm install
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
RUN npm run build
RUN pnpm build
EXPOSE 8080 8081
HEALTHCHECK --interval=10s --timeout=1s --retries=10 CMD wget --spider http://localhost:8081/v1/healthcheck
CMD ["npm", "start"]
CMD ["pnpm", "start"]
Loading