From 527a3bebcc08957f06e65ac556f5a94d79513e26 Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Mon, 2 Oct 2023 22:35:11 +0200 Subject: [PATCH] Init coder environment --- .air.toml | 1 + docker-compose.yml | 16 ---------------- docker/Dockerfile.dev | 17 ----------------- package.json => web/package.json | 4 ++-- tailwind.config.js => web/tailwind.config.js | 2 +- yarn.lock => web/yarn.lock | 0 6 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 docker-compose.yml delete mode 100644 docker/Dockerfile.dev rename package.json => web/package.json (70%) rename tailwind.config.js => web/tailwind.config.js (92%) rename yarn.lock => web/yarn.lock (100%) diff --git a/.air.toml b/.air.toml index d41b277..fad312a 100644 --- a/.air.toml +++ b/.air.toml @@ -1,4 +1,5 @@ [build] bin = "tmp/godash" +pre_cmd = ["npx tailwindcss -i ./web/static/css/tailwind.css -o ./web/static/css/style.css"] cmd = "go build -o tmp/godash cmd/godash/godash.go" exclude_dir = [".gitlab", "docker", "scripts", "node_modules", "static", "storage", "tmp"] diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 175d64a..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -services: - dev: - build: - context: . - dockerfile: ./docker/Dockerfile.dev - args: - - GOLANG_VERSION=${GOLANG_VERSION} - command: air -c .air.toml - environment: - - TZ=Europe/Berlin - - LOG_LEVEL=debug - - TITLE=DEV - ports: - - 4000:4000 - volumes: - - ./:/app/ diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev deleted file mode 100644 index 8f7b915..0000000 --- a/docker/Dockerfile.dev +++ /dev/null @@ -1,17 +0,0 @@ -ARG GOLANG_VERSION -FROM golang:${GOLANG_VERSION}-alpine -RUN apk add tzdata - -# GoDash -WORKDIR /app -COPY ./go.mod . -COPY ./go.sum . -RUN go mod download - -# Air -RUN go install github.com/cosmtrek/air@latest -COPY ./.air.toml . - -# Envs -ENV APP_VERSION=v0.0.1-dev -ENV BUILD_TIME=2023-04-05T20:48:07Z diff --git a/package.json b/web/package.json similarity index 70% rename from package.json rename to web/package.json index 977eeb1..17b2406 100644 --- a/package.json +++ b/web/package.json @@ -1,8 +1,8 @@ { "license": "Apache-2.0", "scripts": { - "tailwind:dev": "npx tailwindcss -i ./web/static/css/tailwind.css -o ./web/static/css/style.css --watch", - "tailwind:build": "npx tailwindcss -i ./web/static/css/tailwind.css -o ./web/static/css/style.css --minify" + "tailwind:dev": "npx tailwindcss -i ./static/css/tailwind.css -o ./static/css/style.css --watch", + "tailwind:build": "npx tailwindcss -i ./static/css/tailwind.css -o ./static/css/style.css --minify" }, "dependencies": { "autoprefixer": "^10.0.2", diff --git a/tailwind.config.js b/web/tailwind.config.js similarity index 92% rename from tailwind.config.js rename to web/tailwind.config.js index a7705cc..7f6e798 100644 --- a/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,6 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./web/templates/**/*.html"], + content: ["./templates/**/*.html"], theme: { container: { center: true diff --git a/yarn.lock b/web/yarn.lock similarity index 100% rename from yarn.lock rename to web/yarn.lock