-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
729 additions
and
127 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
18 |
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,28 @@ | ||
ARG TAG=latest | ||
|
||
FROM --platform=linux/amd64 apache/superset:${TAG} | ||
|
||
|
||
#Copy avni logo and favicon | ||
ADD --chown=superset https://raw.githubusercontent.com/avniproject/avni-website/master/src/img/avni-logo-color.png /app/superset/static/assets/images/avni.png | ||
ADD --chown=superset https://github.com/avniproject/avni-webapp/raw/master/public/favicon.ico /app/superset/static/assets/images/avni-favicon.ico | ||
|
||
# Copy the configuration file, set the environment variable, | ||
COPY --chown=superset ./assets/superset_config.py /app/ | ||
|
||
#Environment variable | ||
ENV SUPERSET_SECRET_KEY=dummy | ||
ENV SUPERSET_DB_NAME=dummy | ||
ENV SUPERSET_DB_USER=dummy | ||
ENV SUPERSET_DB_PASSWORD=dummy | ||
ENV SUPERSET_DB_URL=dummy | ||
ENV SUPERSET_DB_PORT=dummy | ||
ENV SUPERSET_CONFIG_PATH=/app/superset_config.py | ||
|
||
|
||
# Expose the port | ||
EXPOSE 8088 | ||
|
||
|
||
# Run superset | ||
ENTRYPOINT ["superset", "run", "-h", "0.0.0.0", "-p", "8088", "--with-threads", "--reload", "--debugger"] |
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,59 @@ | ||
IMAGE := avniproject/reporting-superset | ||
TAG ?= 4.0.1 | ||
|
||
build-image: | ||
@echo "building image $(IMAGE):$(TAG)" | ||
docker image build --build-arg TAG=$(TAG) -t $(IMAGE):$(TAG) . | ||
|
||
re-build-image:delete-image | ||
@echo "building image $(IMAGE):$(TAG)" | ||
docker image build --build-arg version=$(TAG) -t $(IMAGE):$(TAG) . | ||
|
||
delete-image: | ||
@if docker image inspect $(IMAGE):$(TAG) > /dev/null 2>&1; then \ | ||
echo "Image $(IMAGE):$(TAG) found. Deleting..."; \ | ||
docker image rm -f $(IMAGE):$(TAG); \ | ||
else \ | ||
echo "Image $(IMAGE):$(TAG) not found."; \ | ||
fi | ||
|
||
push-image: | ||
@if [ -z "$(REPO_URI)" ]; then \ | ||
echo "REPO_URI is not set"; \ | ||
exit 1; \ | ||
fi | ||
@if docker image inspect $(REPO_URI)/$(IMAGE):$(TAG) > /dev/null 2>&1; then \ | ||
echo "Image $(REPO_URI)/$(IMAGE):$(TAG) found. deleting from the local"; \ | ||
docker image rm -f $(IMAGE):$(TAG); \ | ||
else \ | ||
echo "Image $(REPO_URI)/$(IMAGE):$(TAG) not found in local."; \ | ||
fi | ||
docker tag $(IMAGE):$(TAG) $(REPO_URI)/$(IMAGE):$(TAG) | ||
echo "pushing image $(REPO_URI)/$(IMAGE):$(TAG)"; | ||
docker push $(REPO_URI)/$(IMAGE):$(TAG) | ||
|
||
delete-repo-image: | ||
@if [ -z "$(REPO_URI)" ]; then \ | ||
echo "REPO_URI is not set"; \ | ||
exit 1; \ | ||
fi | ||
docker image rm $(REPO_URI)/$(IMAGE):$(TAG) | ||
|
||
inspect-image: | ||
docker image inspect $(IMAGE):$(TAG) | ||
|
||
run-container: | ||
docker run -d -p 8088:8088 \ | ||
--name superset_$(TAG) \ | ||
--env-file superset.env \ | ||
$(IMAGE):$(TAG) | ||
@$(MAKE) get-container-logs | ||
|
||
remove-container: | ||
docker container rm -f superset_$(TAG) | ||
|
||
get-container-logs: | ||
docker logs -f superset_$(TAG) | ||
|
||
execute-container: | ||
docker container exec -it superset_$(TAG) bash |
Oops, something went wrong.