Skip to content

Commit

Permalink
Inicio de repositorio
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Gómez Buceta committed Nov 7, 2023
1 parent 9defd3d commit 7360a14
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,linux

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#1a1a1a",
"activityBar.background": "#1a1a1a",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#606020",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#1a1a1a",
"statusBar.background": "#000000",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#1a1a1a",
"statusBarItem.remoteBackground": "#000000",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#000000",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#00000099",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#000"
}
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:
superset:
build:
context: ./superset
dockerfile: dockerfile
container_name: superset
environment:
- ADMIN_USERNAME=admin
- [email protected]
- ADMIN_PASSWORD=admin
ports:
- '8088:8088'
17 changes: 17 additions & 0 deletions superset/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM apache/superset:3.0.1

USER root

RUN pip install mysqlclient

ENV ADMIN_USERNAME $ADMIN_USERNAME
ENV ADMIN_EMAIL $ADMIN_EMAIL
ENV ADMIN_PASSWORD $ADMIN_PASSWORD

COPY ./superset-init.sh /superset-init.sh

COPY superset_config.py /app/
ENV SUPERSET_CONFIG_PATH /app/superset_config.py

USER superset
ENTRYPOINT [ "/superset-init.sh" ]
13 changes: 13 additions & 0 deletions superset/superset-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# create Admin user, you can read these values from env or anywhere else possible
superset fab create-admin --username "$ADMIN_USERNAME" --firstname Superset --lastname Admin --email "$ADMIN_EMAIL" --password "$ADMIN_PASSWORD"

# Upgrading Superset metastore
superset db upgrade

# setup roles and permissions
superset superset init

# Starting server
/bin/sh -c /usr/bin/run-server.sh
9 changes: 9 additions & 0 deletions superset/superset_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FEATURE_FLAGS = {
"ENABLE_TEMPLATE_PROCESSING": True,
}
ENABLE_PROXY_FIX = True
SECRET_KEY = "PIT3IXGyp2PvjwY9bSCzPM9Duq6g94dnf9UUxheDGJytXjVRWrFvPvYNjfLAbxyR"
LANGUAGES = {
"en": {"flag": "us", "name": "English"},
"es": {"flag": "es", "name": "Español"},
}

0 comments on commit 7360a14

Please sign in to comment.