1
0
mirror of https://github.com/robonen/canvas-3d.git synced 2026-03-20 02:44:40 +00:00

feat(repo): base taskfile

This commit is contained in:
2022-11-15 07:13:46 +07:00
parent 8d3b3f9fe3
commit 8b24b15df8
7 changed files with 41 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
* *
# Allow files and directories # Allow files and directories
!.env
!src !src
!nuxt.config.ts !nuxt.config.ts
!tsconfig.json !tsconfig.json

View File

@@ -1,3 +1,5 @@
APP_NAME=canvas-3d
# Infrastucture config # Infrastucture config
FORWARD_APP_PORT=3000 FORWARD_APP_PORT=3000
@@ -7,4 +9,4 @@ DB_PASSWORD=password
DB_DATABASE=c3d DB_DATABASE=c3d
# App config # App config
NUXT_API_HOST=http://app NUXT_API_HOST=http://localhost/api

1
.gitignore vendored
View File

@@ -19,3 +19,4 @@ node_modules
# Environment # Environment
.env .env
.env

31
Taskfile.yml Normal file
View File

@@ -0,0 +1,31 @@
version: '3'
dotenv: [ '.env' ]
tasks:
make:env:
cmds:
- '[ ! -f .env ] && cp .env.example .env; exit 0'
make:install:
cmds:
- '[ ! -d node_modules ] && npm install; exit 0'
local:run:
ignore_error: true
deps: [ make:env, make:install ]
cmds:
- npm run dev
docker:run:
deps: [ make:env ]
cmds:
- docker-compose -p $APP_NAME up -d
docker:stop:
cmds:
- docker-compose -p $APP_NAME down
docker:stop:force:
cmds:
- docker-compose -p $APP_NAME down -v --remove-orphans

View File

@@ -1,7 +1,7 @@
server { server {
listen 80; listen 80;
# Default docker DNS # default docker DNS
resolver 127.0.0.11 ipv6=off valid=10s; resolver 127.0.0.11 ipv6=off valid=10s;
# . files # . files

View File

@@ -16,7 +16,7 @@ services:
- app - app
app: app:
# container_name: app # container_name: app
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
@@ -25,8 +25,8 @@ services:
replicas: 2 replicas: 2
expose: expose:
- '${FORWARD_APP_PORT:-3000}' - '${FORWARD_APP_PORT:-3000}'
# ports: # ports:
# - '${FORWARD_APP_PORT:-3000}:3000' # - '${FORWARD_APP_PORT:-3000}:3000'
networks: networks:
- c3d_net - c3d_net
depends_on: depends_on:

View File

@@ -4,6 +4,7 @@
"bugs": { "bugs": {
"url": "https://github.com/robonen/canvas-3d/issues?q=is:open is:issue label:bug" "url": "https://github.com/robonen/canvas-3d/issues?q=is:open is:issue label:bug"
}, },
"author": "Andrew Robonen <robonenandrew@gmail.com>",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {