-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve(ui): add product unit and docker compose
- Loading branch information
1 parent
f134b16
commit 62f7566
Showing
16 changed files
with
1,409 additions
and
1,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,158 @@ | ||
version: '3.6' | ||
services: | ||
traefik: | ||
image: "traefik:v2.5" | ||
container_name: "traefik" | ||
command: | ||
- "--api.insecure=true" | ||
- "--providers.docker=true" | ||
- "--providers.docker.exposedbydefault=false" | ||
- "--entrypoints.web.address=:1337" | ||
ports: | ||
- "1337:1337" | ||
- "9090:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
postgres: | ||
image: postgres:15.0 | ||
image: postgres | ||
restart: always | ||
volumes: | ||
- ./docker/data/db:/var/lib/postgresql/data | ||
- ./docker/initdb.d:/docker-entrypoint-initdb.d:ro | ||
- ./data/db:/var/lib/postgresql/data | ||
- ./initdb.d:/docker-entrypoint-initdb.d:ro | ||
environment: | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-secretpgpassword} | ||
ports: | ||
- '5432:5432' | ||
graphql-engine: | ||
image: hasura/graphql-engine:v2.35.0 | ||
image: hasura/graphql-engine:latest | ||
depends_on: | ||
- postgres | ||
- 'postgres' | ||
restart: always | ||
expose: | ||
- 8080 | ||
ports: | ||
- '8080:8080' | ||
environment: | ||
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-secretpgpassword}@postgres:5432/postgres | ||
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET} | ||
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} | ||
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public | ||
HASURA_GRAPHQL_LOG_LEVEL: debug | ||
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' | ||
ports: | ||
- '8080:8080' | ||
hasura-auth: | ||
image: nhost/hasura-auth:latest | ||
HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION: 'hasura-default' | ||
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: 'naming_convention' | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.hasura.rule=Host(`localhost`) && PathPrefix(`/`)" | ||
- "traefik.http.routers.hasura.entrypoints=web" | ||
auth: | ||
image: nhost/hasura-auth | ||
depends_on: | ||
- postgres | ||
- graphql-engine | ||
restart: always | ||
volumes: | ||
- ./emails:/app/email-templates | ||
env_file: | ||
- .env | ||
environment: | ||
AUTH_HOST: '0.0.0.0' | ||
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-secretpgpassword}@postgres:5432/postgres | ||
HASURA_GRAPHQL_GRAPHQL_URL: http://graphql-engine:8080/v1/graphql | ||
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET} | ||
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} | ||
AUTH_CLIENT_URL: ${AUTH_CLIENT_URL:-http://localhost:3001} | ||
AUTH_PORT: 4000 | ||
AUTH_SMTP_HOST: mailhog | ||
AUTH_SMTP_PORT: 1025 | ||
AUTH_SMTP_USER: user | ||
AUTH_SMTP_PASS: password | ||
AUTH_SMTP_SENDER: [email protected] | ||
expose: | ||
- 4000 | ||
ports: | ||
- '4000:4000' | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.middlewares.strip-auth.stripprefix.prefixes=/v1/auth" | ||
- "traefik.http.routers.auth.rule=Host(`localhost`) && PathPrefix(`/v1/auth`)" | ||
- "traefik.http.routers.auth.middlewares=strip-auth@docker" | ||
- "traefik.http.routers.auth.entrypoints=web" | ||
storage: | ||
image: nhost/hasura-storage:0.4.0 | ||
depends_on: | ||
- postgres | ||
- graphql-engine | ||
- minio | ||
restart: always | ||
expose: | ||
- 8000 | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
PUBLIC_URL: http://localhost:${PROXY_PORT:-1337} | ||
HASURA_METADATA: 1 | ||
HASURA_ENDPOINT: http://graphql-engine:8080/v1 | ||
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} | ||
S3_ACCESS_KEY: ${STORAGE_ACCESS_KEY} | ||
S3_SECRET_KEY: ${STORAGE_SECRET_KEY} | ||
S3_ENDPOINT: http://minio:8484 | ||
S3_BUCKET: nhost | ||
POSTGRES_MIGRATIONS: 1 | ||
POSTGRES_MIGRATIONS_SOURCE: postgres://postgres:${POSTGRES_PASSWORD:-secretpgpassword}@postgres:5432/postgres?sslmode=disable | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.storage.rule=Host(`localhost`) && PathPrefix(`/v1/storage`)" | ||
- "traefik.http.routers.storage.entrypoints=web" | ||
# Rewrite the path so it matches with the new storage API path introduced in hasura-storage 0.2 | ||
- "traefik.http.middlewares.strip-suffix.replacepathregex.regex=^/v1/storage/(.*)" | ||
- "traefik.http.middlewares.strip-suffix.replacepathregex.replacement=/v1/$$1" | ||
- "traefik.http.routers.storage.middlewares=strip-suffix@docker" | ||
command: serve | ||
functions: | ||
image: nhost/functions:0.1.8 | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.middlewares.strip-functions.stripprefix.prefixes=/v1/functions" | ||
- "traefik.http.routers.functions.rule=Host(`localhost`) && PathPrefix(`/v1/functions`)" | ||
- "traefik.http.routers.functions.middlewares=strip-functions@docker" | ||
- "traefik.http.routers.functions.entrypoints=web" | ||
restart: always | ||
expose: | ||
- 3000 | ||
volumes: | ||
- .:/opt/project | ||
- functions_node_modules:/opt/project/node_modules | ||
- /opt/project/data/ | ||
- /opt/project/initdb.d/ | ||
minio: | ||
image: minio/minio:RELEASE.2021-09-24T00-24-24Z | ||
entrypoint: sh | ||
command: -c 'mkdir -p /data/nhost && /opt/bin/minio server --address :8484 /data' | ||
environment: | ||
MINIO_ROOT_USER: ${STORAGE_ACCESS_KEY} | ||
MINIO_ROOT_PASSWORD: ${STORAGE_SECRET_KEY} | ||
ports: | ||
- ${MINIO_PORT:-8484}:8484 | ||
volumes: | ||
- ./email-templates:/app/email-templates | ||
- ./data/minio:/data | ||
mailhog: | ||
image: mailhog/mailhog | ||
environment: | ||
SMTP_HOST: mailhog | ||
SMTP_PORT: 1025 | ||
SMTP_PASS: ${AUTH_SMTP_PASS} | ||
SMTP_USER: ${AUTH_SMTP_USER} | ||
SMTP_SECURE: '${AUTH_SMTP_SECURE}' | ||
SMTP_SENDER: ${AUTH_SMTP_SENDER} | ||
SMTP_HOST: ${AUTH_SMTP_HOST:-mailhog} | ||
SMTP_PORT: ${AUTH_SMTP_PORT:-1025} | ||
SMTP_PASS: ${AUTH_SMTP_PASS:-password} | ||
SMTP_USER: ${AUTH_SMTP_USER:-user} | ||
SMTP_SECURE: "${AUTH_SMTP_SECURE:-false}" | ||
SMTP_SENDER: ${AUTH_SMTP_SENDER:[email protected]} | ||
ports: | ||
- 1025:1025 # smtp server | ||
- 8025:8025 # web ui | ||
- ${AUTH_SMTP_PORT:-1025}:1025 | ||
- 8025:8025 | ||
volumes: | ||
- ./docker/data/mailhog:/maildir | ||
- ./data/mailhog:/maildir | ||
# dashboard: | ||
# image: nhost/dashboard:0.7.4 | ||
# ports: | ||
# - "3030:3000" | ||
volumes: | ||
functions_node_modules: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "functions", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"strictNullChecks": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,6 @@ | |
"vue-router": "^4.2.5" | ||
}, | ||
"dependencies": { | ||
"echarts": "^5.3" | ||
"echarts": "^5.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<div> | ||
<TermTable :group-id="TermGroupID.productUnit" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { TermGroupID } from '~/constants'; | ||
useHead({ | ||
title: 'Unit', | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.