-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: nacos support application.properties
- Loading branch information
Showing
17 changed files
with
163 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### azkaban ############################################ | ||
|
||
# -------------- image config --------------- | ||
# official image | ||
IMAGE_OFFICIAL_AZKABAN_NAME=test/test | ||
IMAGE_OFFICIAL_AZKABAN_VERSION=4.0.0 | ||
# basic image | ||
IMAGE_BASIC_AZKABAN_VERSION=4.0.0 | ||
# app image | ||
IMAGE_APP_AZKABAN_VERSION=latest | ||
# -------------- service config -------------- | ||
AZKABAN_HOST_PORT=4500 | ||
AZKABAN_CONTAINER_PORT=4500 |
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,40 @@ | ||
## What is this directory | ||
This is the service directory, it includes these directories and files as bellow. | ||
|
||
## 1. Directories | ||
|
||
### (1) Commit to Git. | ||
|
||
#### /hooks | ||
|
||
```/hooks```: This is the hook actions while the service/container start/stop. | ||
|
||
#### /init | ||
|
||
```/init```: This is init scripts after the container created, is executed by ```./hooks/after_start.sh``` | ||
|
||
#### /make_app_image | ||
```/make_app_image```: This is the ```sparrow-app-*``` image making directory. | ||
|
||
#### /make_basic_image | ||
```/make_basic_image```: This is the ```sparrow-basic-*``` image making directory. | ||
|
||
#### /templates | ||
```/templates```: this is the template directory for the service, the ```template``` means all static and unchanging files. | ||
|
||
### (2)Not commit to Git. | ||
|
||
#### /data | ||
```data```: This is the data storage directory for the service/container, you mustn't create any files in the ```data``` directory, because it may cause service/container start failed. | ||
|
||
#### /logs | ||
- ```logs```: This is the log storage directory for the service/container. | ||
|
||
## 2. Files | ||
|
||
#### /.env | ||
```/.env```: this is the environment variables file. | ||
|
||
#### /docker-compose.yml | ||
```/docker-compose.yml```: this is the ```docker-compose.yml``` file. | ||
|
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,22 @@ | ||
services: | ||
### azkaban ######################################################### | ||
azkaban: | ||
hostname: azkaban | ||
image: sparrow-app-azkaban:${IMAGE_APP_AZKABAN_VERSION} # pull_or_build_app_image(local image=>remote image=>build image) | ||
container_name: sparrow_container_${CONTAINER_NAMESPACE}_azkaban | ||
platform: ${FROM_PLATFORM} | ||
restart: always | ||
environment: | ||
TZ: ${TZ} | ||
LANG: C.UTF-8 | ||
volumes: | ||
- /etc/localtime:/etc/localtime:ro | ||
- ./azkaban/:/home/sparrow/azkaban/ | ||
- ./azkaban/data/:/var/data/azkaban/ # data persistence, use a common data persistence directory /var/data/{SERVICE} | ||
ports: | ||
# You don't need to expose the port in the Dockerfile. | ||
- "${AZKABAN_HOST_PORT}:${AZKABAN_CONTAINER_PORT}" | ||
networks: | ||
- backend | ||
# only for debug | ||
# command: "tail -f /dev/null" |
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,2 @@ | ||
## What is this directory | ||
This is the hook actions while the service/container start/stop. |
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,4 @@ | ||
#!/bin/sh | ||
|
||
# include sdk of sparrow. | ||
. .work/include/sdk.sh |
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,4 @@ | ||
#!/bin/sh | ||
|
||
# include sdk of sparrow. | ||
. .work/include/sdk.sh |
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,4 @@ | ||
#!/bin/sh | ||
|
||
# include sdk of sparrow. | ||
. .work/include/sdk.sh |
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,4 @@ | ||
#!/bin/sh | ||
|
||
# include sdk of sparrow. | ||
. .work/include/sdk.sh |
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,2 @@ | ||
## What is this directory | ||
This is init scripts after the container created, is executed by ```./hooks/after_start.sh```. |
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,3 @@ | ||
ARG FROM_PLATFORM | ||
ARG IMAGE_BASIC_AZKABAN_VERSION | ||
FROM --platform=${FROM_PLATFORM} sparrow-basic-azkaban:${IMAGE_BASIC_AZKABAN_VERSION} |
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,2 @@ | ||
## What is this directory | ||
This is the ```sparrow-app-*``` image making directory. |
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,31 @@ | ||
#!/bin/sh | ||
|
||
# cd base dir of project. | ||
# the process is in the same shell as the starting shell. | ||
cd $SPARROW_BASE_PATH | ||
|
||
# define this service. | ||
service_name="azkaban" | ||
|
||
print_stage "try to pull/build sparrow-basic-${service_name} $IMAGE_BASIC_AZKABAN_VERSION" | ||
if pull basic $service_name $IMAGE_BASIC_AZKABAN_VERSION; then | ||
print_info "pull success" | ||
elif . "./${service_name}/make_basic_image/run.sh"; then | ||
print_info "build success" | ||
else | ||
print_error "pull/build failed" | ||
exit 1 | ||
fi | ||
|
||
cd $service_name/ | ||
if ! docker build \ | ||
--build-arg FROM_PLATFORM=${FROM_PLATFORM} \ | ||
--build-arg IMAGE_BASIC_AZKABAN_VERSION=${IMAGE_BASIC_AZKABAN_VERSION} \ | ||
\ | ||
-f ./make_app_image/Dockerfile \ | ||
-t sparrow-app-$service_name:${IMAGE_APP_AZKABAN_VERSION} . ; then | ||
print_error "build image failed" | ||
exit 1 | ||
fi | ||
|
||
cd ../ |
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,4 @@ | ||
ARG FROM_PLATFORM | ||
ARG IMAGE_OFFICIAL_AZKABAN_NAME | ||
ARG IMAGE_OFFICIAL_AZKABAN_VERSION | ||
FROM --platform=${FROM_PLATFORM} ${IMAGE_OFFICIAL_AZKABAN_NAME}:${IMAGE_OFFICIAL_AZKABAN_VERSION} AS builder |
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,2 @@ | ||
## What is this directory | ||
This is the ```sparrow-basic-*``` image making directory. |
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,22 @@ | ||
#!/bin/sh | ||
|
||
# cd base dir of project. | ||
# the process is in the same shell as the starting shell. | ||
cd $SPARROW_BASE_PATH | ||
|
||
# define this service. | ||
service_name="azkaban" | ||
|
||
cd $service_name/ | ||
if ! docker build \ | ||
--build-arg FROM_PLATFORM=${FROM_PLATFORM} \ | ||
--build-arg IMAGE_OFFICIAL_AZKABAN_NAME=${IMAGE_OFFICIAL_AZKABAN_NAME} \ | ||
--build-arg IMAGE_OFFICIAL_AZKABAN_VERSION=${IMAGE_OFFICIAL_AZKABAN_VERSION} \ | ||
\ | ||
-f ./make_basic_image/Dockerfile \ | ||
-t sparrow-basic-$service_name:${IMAGE_BASIC_AZKABAN_VERSION} . ; then | ||
print_error "build image failed" | ||
exit 1 | ||
fi | ||
|
||
cd ../ |
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,3 @@ | ||
## What is this directory | ||
This is the template directory for the service, the ```template``` means all static and unchanging files. | ||
|
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