Files
coolify/src/store/index.ts
Andras Bacsai c7efe899fa v1.0.14 (#48)
# Features
- Basic Python support

# Fixes
- Fix default start command
2021-05-22 15:18:58 +02:00

165 lines
2.4 KiB
TypeScript

import type {
Application,
Dashboard,
Database,
DateTimeFormatOptions,
GithubInstallations
} from 'src/global';
import { writable } from 'svelte/store';
export const dashboard = writable<Dashboard>({
databases: {
deployed: []
},
applications: {
deployed: []
},
services: {
deployed: []
}
});
export const dateOptions: DateTimeFormatOptions = {
year: 'numeric',
month: 'short',
day: '2-digit',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: false
};
export const githubRepositories = writable([]);
export const githubInstallations = writable<GithubInstallations>([]);
export const application = writable<Application>({
github: {
installation: {
id: null
},
app: {
id: null
}
},
repository: {
id: null,
organization: 'new',
name: 'start',
branch: null
},
general: {
deployId: null,
nickname: null,
workdir: null
},
build: {
pack: 'static',
directory: null,
command: {
build: null,
installation: null,
start: null,
python: {
module: null,
instance: null
}
},
container: {
name: null,
tag: null,
baseSHA: null
}
},
publish: {
directory: null,
domain: null,
path: '/',
port: null,
secrets: []
}
});
export const initConf = writable({});
export const initialApplication: Application = {
github: {
installation: {
id: null
},
app: {
id: null
}
},
repository: {
id: null,
organization: null,
name: null,
branch: null
},
general: {
deployId: null,
nickname: null,
workdir: null
},
build: {
pack: 'static',
directory: null,
command: {
build: null,
installation: null,
start: null,
python: {
module: null,
instance: null
}
},
container: {
name: null,
tag: null,
baseSHA: null
}
},
publish: {
directory: null,
domain: null,
path: '/',
port: null,
secrets: []
}
};
export const initialDatabase: Database = {
config: {
general: {
workdir: null,
deployId: null,
nickname: null,
type: null
},
database: {
username: null,
passwords: [],
defaultDatabaseName: null
},
deploy: {
name: null
}
},
envs: {}
};
export const database = writable<Database>({
config: {},
envs: []
});
export const newService = writable({
email: null,
userName: 'admin',
userPassword: null,
userPasswordAgain: null,
baseURL: null
});
export const initialNewService = {
email: null,
userName: 'admin',
userPassword: null,
userPasswordAgain: null,
baseURL: null
};