Skip to content

Commit

Permalink
Merge pull request #22 from kamoltat/wip-ksirivad-docker-file
Browse files Browse the repository at this point in the history
  • Loading branch information
zmc authored Jul 25, 2023
2 parents fd1f435 + 42f57b4 commit 53aa517
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:alpine
RUN mkdir /app
WORKDIR /app
COPY package*.json /app
RUN npm install
COPY . /app
CMD ["npm", "start"]
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,34 @@ You'll need at least [node v17](https://nodejs.org/en/download). Once you've got

$ npm install
$ npm run start

## Integrate with teuthology docker setup

If you want to develop in a container environment
and connect to other teuthology services, here is what
you can do:

In [teuthology's docker-compose](https://github.com/ceph/teuthology/blob/main/docs/docker-compose/docker-compose.yml) replace `pulpito` service with the following:

```
pulpito:
build:
context: ../../../pulpito-ng
environment:
REACT_APP_PADDLES_SERVER: http://0.0.0.0:8080
depends_on:
paddles:
condition: service_healthy
teuthology_api:
condition: service_healthy
links:
- paddles
- teuthology_api
healthcheck:
test: [ "CMD", "curl", "-f", "http://0.0.0.0:8081" ]
timeout: 5s
interval: 10s
retries: 2
ports:
- 8081:8081
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"typescript": "^5.1.6",
"vite": "^4.4.1"
}
}
}
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ export default defineConfig(() => {
outDir: "build",
},
plugins: [react()],
server: {
port: 8081,
}
};
});

0 comments on commit 53aa517

Please sign in to comment.