some changes
parent
0387eac358
commit
a0cc7e7386
@ -1,14 +0,0 @@
|
||||
{
|
||||
"0 debug pnpm:scope": {
|
||||
"selected": 1
|
||||
},
|
||||
"1 error pnpm": {
|
||||
"code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND",
|
||||
"err": {
|
||||
"name": "pnpm",
|
||||
"message": "No package.json (or package.yaml, or package.json5) was found in \"/home/jasper/go/src/spahl.ddns.net/jasper/wok-able-backend\".",
|
||||
"code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND",
|
||||
"stack": "pnpm: No package.json (or package.yaml, or package.json5) was found in \"/home/jasper/go/src/spahl.ddns.net/jasper/wok-able-backend\".\n at readProjectManifest (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:19818:13)\n at async Object.readProjectManifestOnly (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:19822:28)\n at async readProjectManifestOnly (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:43721:24)\n at async Object.handler (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:177918:24)\n at async /usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:182194:21\n at async run (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:182168:34)\n at async runPnpm (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:182387:5)\n at async /usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.32.3/node_modules/pnpm/dist/pnpm.cjs:182379:7"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +1,26 @@
|
||||
{
|
||||
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
|
||||
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
|
||||
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Server",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "main.go"
|
||||
},
|
||||
{
|
||||
"name": "Launch Package",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${fileDirname}"
|
||||
}
|
||||
]
|
||||
}
|
||||
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
|
||||
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
|
||||
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
|
||||
{
|
||||
"name": "Attach to Process",
|
||||
"type": "go",
|
||||
"request": "attach",
|
||||
"mode": "local",
|
||||
"processId": 0
|
||||
},
|
||||
{
|
||||
"name": "Run Go Server",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "${workspaceFolder}",
|
||||
"env": {},
|
||||
"args": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
##
|
||||
## Build Backend
|
||||
##
|
||||
FROM golang:1.18-buster AS build_backend
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLE=1 \
|
||||
GOOS=linux \
|
||||
GOARCH=amd64
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
|
||||
RUN go mod download
|
||||
RUN apt update && apt install -y ca-certificates
|
||||
|
||||
COPY *.go ./
|
||||
COPY auth/. auth/.
|
||||
COPY controllers/. controllers/.
|
||||
COPY models/. models/.
|
||||
COPY server/. server/.
|
||||
|
||||
RUN go build -a --installsuffix cgo -v -tags netgo -ldflags '-extldflags "-static"' -o /main .
|
||||
|
||||
##
|
||||
## Build Frontend
|
||||
##
|
||||
FROM node:16 AS build_frontend
|
||||
WORKDIR /usr/src/app
|
||||
RUN npm install -g pnpm
|
||||
|
||||
COPY assets/package.json ./
|
||||
COPY assets/pnpm-lock.yaml ./
|
||||
|
||||
RUN pnpm i
|
||||
|
||||
COPY assets/. .
|
||||
|
||||
RUN pnpm build
|
||||
|
||||
##
|
||||
## Deploy
|
||||
##
|
||||
FROM scratch
|
||||
LABEL maintainer="Jasper Spahl <jasperspahl@web.de>"
|
||||
|
||||
ENV WOKABLE_MODE="release"
|
||||
WORKDIR /
|
||||
COPY --from=build_backend /main ./
|
||||
COPY --from=build_frontend /usr/src/app/dist/. assets/dist/.
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT [ "/main" ]
|
@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
npm-debug.log
|
@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
import { StyledCard } from './styled'
|
||||
|
||||
const Card: React.FC = ({children}) => {
|
||||
return (
|
||||
<StyledCard>
|
||||
{children}
|
||||
</StyledCard>
|
||||
)
|
||||
}
|
||||
|
||||
export default Card
|
@ -0,0 +1,9 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const StyledCard = styled.div`
|
||||
border-radius: ${props => props.theme.borderRadius};
|
||||
padding: 16px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
`;
|
@ -0,0 +1,48 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
export interface Color {
|
||||
main: string;
|
||||
contrastText: string;
|
||||
}
|
||||
|
||||
export interface ColorPalette {
|
||||
common: Color;
|
||||
muted: Color;
|
||||
primary: Color;
|
||||
secondary: Color;
|
||||
}
|
||||
|
||||
export interface Theme {
|
||||
borderRadius: string;
|
||||
palette: ColorPalette
|
||||
}
|
||||
|
||||
const initialState: Theme = {
|
||||
borderRadius: "4px",
|
||||
palette: {
|
||||
common: {
|
||||
main: "#ffffff",
|
||||
contrastText: "#222831",
|
||||
},
|
||||
muted: {
|
||||
main: "#aaaaaa",
|
||||
contrastText: "#222831"
|
||||
},
|
||||
primary: {
|
||||
main: "#726a95",
|
||||
contrastText: '#ffffff'
|
||||
},
|
||||
secondary: {
|
||||
main: "#709bf0",
|
||||
contrastText: "#ffffff",
|
||||
}
|
||||
}
|
||||
}
|
||||
const themeSlice = createSlice({
|
||||
name: "theme",
|
||||
initialState,
|
||||
reducers: {
|
||||
}
|
||||
})
|
||||
|
||||
export const {} = themeSlice.actions;
|
||||
export default themeSlice.reducer;
|
@ -0,0 +1,6 @@
|
||||
import "styled-components";
|
||||
|
||||
import {Theme} from "./features/theme/theme-slice";
|
||||
declare module 'styled-components' {
|
||||
export interface DefaultTheme extends Theme {}
|
||||
}
|
Loading…
Reference in New Issue