-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker compose file and extend documentation
We provide profiles in the docker compose file to allow users to specify which services they want to start: - no selection of a profile starts only Postgres and Elasticsearch. This is suited for building and running the openvsx services on the local machine. - "openvsx" profile additionally builds and starts all openvsx-related services in separate containers - "backend", "frontend", "commandline" profiles for more fine-grained choices. - "kibana" profile can optionally be added to explore the Elasticsearch instance more conveniently, Contributed on behalf of STMicroelectronics Signed-off-by: Olaf Lessenich <[email protected]> Co-authored-by: Anibal <[email protected]>
- Loading branch information
1 parent
71941ca
commit c2db736
Showing
6 changed files
with
176 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,8 @@ | |
"lint": "eslint -c ./configs/eslintrc.json --ext .ts src", | ||
"prepare": "yarn run clean && yarn run build", | ||
"publish:next": "yarn npm publish --tag next", | ||
"publish:latest": "yarn npm publish --tag latest" | ||
"publish:latest": "yarn npm publish --tag latest", | ||
"load-extensions": "node scripts/load-test-extensions.js" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
services: | ||
|
||
postgres: | ||
image: postgres:latest | ||
environment: | ||
- POSTGRES_USER=openvsx | ||
- POSTGRES_PASSWORD=openvsx | ||
logging: | ||
options: | ||
max-size: 10m | ||
max-file: "3" | ||
ports: | ||
- '5432:5432' | ||
|
||
elasticsearch: | ||
image: elasticsearch:8.7.1 | ||
environment: | ||
- xpack.security.enabled=false | ||
- xpack.ml.enabled=false | ||
- discovery.type=single-node | ||
- bootstrap.memory_lock=true | ||
- cluster.routing.allocation.disk.threshold_enabled=false | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
healthcheck: | ||
test: curl -s http://elasticsearch01:9200 >/dev/null || exit 1 | ||
interval: 10s | ||
timeout: 5s | ||
retries: 50 | ||
start_period: 5s | ||
|
||
kibana: | ||
image: kibana:8.7.1 | ||
ports: | ||
- "5601:5601" | ||
environment: | ||
- ELASTICSEARCH_URL=http://elasticsearch:9200 | ||
depends_on: | ||
- elasticsearch | ||
profiles: | ||
- kibana | ||
|
||
server: | ||
image: openjdk:17 | ||
working_dir: /app | ||
command: sh -c 'scripts/generate-properties.sh --docker && ./gradlew assemble && ./gradlew runServer' | ||
volumes: | ||
- ./server:/app | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
- postgres | ||
- elasticsearch | ||
healthcheck: | ||
test: "curl --fail --silent localhost:8081/actuator/health | grep UP || exit 1" | ||
interval: 10s | ||
timeout: 5s | ||
retries: 50 | ||
start_period: 5s | ||
profiles: | ||
- openvsx | ||
- backend | ||
|
||
webui: | ||
image: node:18 | ||
working_dir: /app | ||
command: sh -c 'yarn && yarn build && yarn build:default && yarn start:default' | ||
volumes: | ||
- ./webui:/app | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- server | ||
profiles: | ||
- openvsx | ||
- frontend | ||
|
||
cli: | ||
image: node:18 | ||
working_dir: /app | ||
command: sh -c 'yarn && yarn watch' | ||
volumes: | ||
- ./cli:/app | ||
depends_on: | ||
- server | ||
environment: | ||
- OVSX_REGISTRY_URL=http://server:8080 | ||
profiles: | ||
- openvsx | ||
- commandline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters