1
0
mirror of https://github.com/artvs18/PostgreSQL-docker-image.git synced 2026-06-19 17:17:04 +02:00

Version 0.1

Version 0.1 of Docker PostgreSQL image
This commit is contained in:
Artemy Volkov
2023-01-28 01:35:53 +03:00
commit 7093744323
24 changed files with 11059 additions and 0 deletions
BIN
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
Electron 17.1.1
+1
View File
@@ -0,0 +1 @@
BROWSER=none
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="color-scheme" content="light dark" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+10519
View File
File diff suppressed because it is too large Load Diff
+31
View File
@@ -0,0 +1,31 @@
{
"name": "ui",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"@docker/docker-mui-theme": "<0.1.0",
"@docker/extension-api-client": "0.3.3",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@mui/material": "5.10.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"test": "jest src"
},
"devDependencies": {
"@docker/extension-api-client-types": "0.3.3",
"@types/jest": "^29.1.2",
"@types/node": "^18.7.18",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
"jest": "^29.1.2",
"typescript": "^4.8.3",
"vite": "^3.1.0"
}
}
+53
View File
@@ -0,0 +1,53 @@
import React from 'react';
import Button from '@mui/material/Button';
import { createDockerDesktopClient } from '@docker/extension-api-client';
import { Stack, TextField, Typography } from '@mui/material';
// Note: This line relies on Docker Desktop's presence as a host application.
// If you're running this React app in a browser, it won't work properly.
const client = createDockerDesktopClient();
function useDockerDesktopClient() {
return client;
}
export function App() {
const [response, setResponse] = React.useState<string>();
const ddClient = useDockerDesktopClient();
const fetchAndDisplayResponse = async () => {
const result = await ddClient.extension.vm?.service?.get('/hello');
setResponse(JSON.stringify(result));
};
return (
<>
<Typography variant="h3">Docker extension demo</Typography>
<Typography variant="body1" color="text.secondary" sx={{ mt: 2 }}>
This is a basic page rendered with MUI, using Docker's theme. Read the
MUI documentation to learn more. Using MUI in a conventional way and
avoiding custom styling will help make sure your extension continues to
look great as Docker's theme evolves.
</Typography>
<Typography variant="body1" color="text.secondary" sx={{ mt: 2 }}>
Pressing the below button will trigger a request to the backend. Its
response will appear in the textarea.
</Typography>
<Stack direction="row" alignItems="start" spacing={2} sx={{ mt: 4 }}>
<Button variant="contained" onClick={fetchAndDisplayResponse}>
Call backend
</Button>
<TextField
label="Backend response"
sx={{ width: 480 }}
disabled
multiline
variant="outlined"
minRows={5}
value={response ?? ''}
/>
</Stack>
</>
);
}
+20
View File
@@ -0,0 +1,20 @@
import React from "react";
import ReactDOM from "react-dom/client";
import CssBaseline from "@mui/material/CssBaseline";
import { DockerMuiThemeProvider } from "@docker/docker-mui-theme";
import { App } from './App';
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
{/*
If you eject from MUI (which we don't recommend!), you should add
the `dockerDesktopTheme` class to your root <html> element to get
some minimal Docker theming.
*/}
<DockerMuiThemeProvider>
<CssBaseline />
<App />
</DockerMuiThemeProvider>
</React.StrictMode>
);
+1
View File
@@ -0,0 +1 @@
/// <reference types="vite/client" />
+21
View File
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
+9
View File
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
+15
View File
@@ -0,0 +1,15 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: "./",
build: {
outDir: "build",
},
server: {
port: 3000,
strictPort: true,
}
});