Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

Commit 3cd5966

Browse files
authored
Merge pull request #120 from slashbaseide/develop
Release v0.9.0
2 parents 6f9ac8b + 1fe194d commit 3cd5966

301 files changed

Lines changed: 22081 additions & 278 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# General
2+
.DS_Store
3+
4+
# Visual Studio Code
5+
.vscode/*
6+
.history/
7+
__debug_bin
8+
9+
# Binaries for programs and plugins
10+
*.exe
11+
*.exe~
12+
*.dll
13+
*.so
14+
*.dylib
15+
16+
# Test binary, built with `go test -c`
17+
*.test
18+
19+
# Output of the go coverage tool, specifically when used with LiteIDE
20+
*.out
21+
22+
# Environment
23+
.env
24+
development.env
25+
development.server.env
26+
production.env
27+
28+
# Database
29+
app.db
30+
31+
# Wails
32+
build/bin
33+
node_modules
34+
frontend/desktop/dist
35+
build/darwin/gon-notarize.json
36+
37+
# Frontend Server
38+
frontend/server/dist

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ __debug_bin
2020
*.out
2121

2222
# Environment
23-
local.env
23+
.env
2424
development.env
25+
development.server.env
2526
production.env
2627

2728
# Database
@@ -30,5 +31,8 @@ app.db
3031
# Wails
3132
build/bin
3233
node_modules
33-
frontend/dist
34-
build/darwin/gon-notarize.json
34+
frontend/desktop/dist
35+
build/darwin/gon-notarize.json
36+
37+
# Frontend Server
38+
frontend/server/dist

Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## THIS IS PRODUCTION DOCKERFILE.
2+
## USED TO BUILD: slashbaseide/slashbase image
3+
4+
# Create base image for building go binary
5+
FROM golang:1.20.3-alpine3.17 as base
6+
WORKDIR /app
7+
8+
ENV GO111MODULE="on"
9+
ENV GOOS="linux"
10+
ENV CGO_ENABLED=1
11+
12+
# System dependencies
13+
RUN apk update && apk add --no-cache ca-certificates git build-base && update-ca-certificates
14+
15+
COPY go.mod go.sum ./
16+
RUN go mod download
17+
18+
# Executable builder
19+
FROM base as backendbuilder
20+
21+
WORKDIR /app
22+
COPY . .
23+
RUN mkdir -p /app/frontend/desktop/dist
24+
RUN touch /app/frontend/desktop/dist/nofile
25+
RUN make build-server
26+
27+
# Install dependencies only when needed
28+
FROM node:alpine AS deps
29+
30+
RUN apk add --no-cache libc6-compat
31+
WORKDIR /app
32+
COPY ./frontend/server/package.json ./frontend/server/yarn.lock ./
33+
RUN yarn install --frozen-lockfile
34+
35+
# Rebuild the source code only when needed
36+
FROM node:alpine AS frontendbuilder
37+
38+
WORKDIR /app
39+
COPY ./frontend/server/ .
40+
COPY --from=deps /app/node_modules ./node_modules
41+
RUN yarn build
42+
43+
# Production
44+
FROM alpine:3.14
45+
46+
WORKDIR /slashbase
47+
COPY --from=backendbuilder /app/slashbase /slashbase
48+
COPY --from=frontendbuilder /app/dist /slashbase/web
49+
50+
ENTRYPOINT ["/slashbase/slashbase"]
51+
EXPOSE 3000

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ WAILS ?= $(GOPATH)/bin/wails
77

88
.PHONY: build
99
build:
10-
env CGO_ENABLED=1 $(WAILS) build -trimpath -ldflags="-s -w -X 'main.build=production' -X 'main.version=$(VERSION)'"
10+
env CGO_ENABLED=1 $(WAILS) build -trimpath -ldflags="-s -w -X 'main.envName=production' -X 'main.version=$(VERSION)'"
11+
12+
.PHONY: build-server
13+
build-server:
14+
env CGO_ENABLED=1 go build -trimpath -ldflags="-s -w -X 'main.envName=production' -X 'main.build=server' -X 'main.version=$(VERSION)'"
1115

1216
# DO NOT USE THE FOLLOWING PHONY RECIPIES, THEY ARE ONLY FOR DISTRIBUTION
1317

1418
.PHONY: build-win
1519
build-win:
16-
env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC="x86_64-w64-mingw32-gcc" $(WAILS) build -trimpath -ldflags="-s -w -X 'main.build=production' -X 'main.version=$(VERSION)'" -skipbindings
20+
env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC="x86_64-w64-mingw32-gcc" $(WAILS) build -trimpath -ldflags="-s -w -X 'main.envName=production' -X 'main.version=$(VERSION)'" -skipbindings
1721

1822
.PHONY: sign
1923
sign:

deploy/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO: write install script

deploy/server.env.sample

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ROOT_USER_EMAIL=${slashbase_root_email}
2+
ROOT_USER_PASSWORD=${slashbase_root_password}
3+
4+
AUTH_TOKEN_SECRET=${auth_secret}
5+
CRYPTED_DATA_SECRET=${crypted_data_secret}
6+
7+
APP_DB_HOST=${app_db_host}
8+
APP_DB_PORT=${app_db_port}
9+
APP_DB_USER=${app_db_user}
10+
APP_DB_PASS=${app_db_pass}
11+
APP_DB_NAME=${app_db_name}

development.env.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# rename this file to development.env and replace the comments below to get started on development of slashbase
2-
ENV_NAME=development
32

43
# some secrets are pre-generated for development and can be changed
54
CRYPTED_DATA_SECRET=ca8f161ccd170f5600f2beb6c17873a69b689ad1be5c5e97513e39b3158643ba

0 commit comments

Comments
 (0)