-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michele Mastrogiovanni
committed
Sep 27, 2023
1 parent
ee368dc
commit f68925c
Showing
189 changed files
with
20,540 additions
and
1,077 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,44 +1,64 @@ | ||
services: | ||
|
||
mongo: | ||
image: mongo:latest | ||
restart: on-failure | ||
environment: | ||
MONGO_INITDB_DATABASE: ${DATABASE_NAME} | ||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} | ||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} | ||
volumes: | ||
- ./data/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro | ||
- mongodb_data_container:/data/db | ||
ports: | ||
- "27017:27017" | ||
|
||
traefik: | ||
image: "traefik:v2.6" | ||
image: "traefik:v2.10.4" | ||
restart: on-failure | ||
command: | ||
- "--log.level=INFO" | ||
- "--providers.docker.constraints=Label(`docker.project`, `etaireia`)" | ||
- "--providers.docker=true" | ||
- "--providers.docker.exposedbydefault=false" | ||
- "--entrypoints.web.address=:80" | ||
- "--api.insecure=true" | ||
- "--api.dashboard=true" | ||
ports: | ||
- "80:80/tcp" | ||
- "8080:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
labels: | ||
- "traefik.http.routers.traefik.entryPoints=traefik" | ||
- "traefik.http.routers.traefik.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)" | ||
- "traefik.http.routers.traefik.service=api@internal" | ||
# - "traefik.http.routers.traefik.middlewares=traefik-auth" | ||
# echo $(htpasswd -nB [email protected]) | sed -e s/\\$/\\$\\$/g | ||
# - "traefik.http.middlewares.traefik-auth.basicauth.users=michele.mastrogiovanni@gmail.com:$$2y$$05$$FYl85XcjF1P9dy3lQ/qhAe7gWRngAbTCIZOpgB/kkLxD3IYAABtPO" | ||
|
||
frontend: | ||
build: | ||
context: ./etaireia | ||
signer: | ||
image: node:20 | ||
restart: on-failure | ||
command: | ||
- /bin/bash | ||
- -c | ||
- "cd /app && npm run dev" | ||
environment: | ||
PORT: 3000 | ||
volumes: | ||
- ./ui/signer:/app | ||
labels: | ||
- "docker.project=etaireia" | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.frontend-dev.entrypoints=web" | ||
- "traefik.http.routers.frontend-dev.rule=PathPrefix(`/`)" | ||
- "traefik.http.services.frontend-dev.loadbalancer.server.port=3000" | ||
- "traefik.http.routers.signer.entrypoints=web" | ||
- "traefik.http.routers.signer.rule=PathPrefix(`/signer`)" | ||
- "traefik.http.services.signer.loadbalancer.server.port=3000" | ||
|
||
approval: | ||
image: node:20 | ||
restart: on-failure | ||
command: | ||
- /bin/bash | ||
- -c | ||
- "cd /app && npm run dev" | ||
environment: | ||
PORT: 3000 | ||
volumes: | ||
- ./ui/approval:/app | ||
labels: | ||
- "docker.project=etaireia" | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.approval.entrypoints=web" | ||
- "traefik.http.routers.approval.rule=PathPrefix(`/approval`)" | ||
- "traefik.http.services.approval.loadbalancer.server.port=3000" | ||
|
||
json-server: | ||
image: clue/json-server | ||
|
@@ -53,6 +73,23 @@ services: | |
volumes: | ||
- ./data/db.json:/data/db.json | ||
|
||
# vault: | ||
# image: hashicorp/vault | ||
# volumes: | ||
# - ./data/vault-file:/vault/file:rw | ||
# - ./data/vault:/vault/config:rw | ||
# command: | ||
# - server | ||
# cap_add: | ||
# - IPC_LOCK | ||
# labels: | ||
# - "dev-kit.provided=true" | ||
# - "docker.project=etaireia" | ||
# - "traefik.enable=true" | ||
# - "traefik.http.routers.vault.entrypoints=web" | ||
# - "traefik.http.routers.vault.rule=PathPrefix(`/`)" | ||
# - "traefik.http.services.vault.loadbalancer.server.port=8200" | ||
|
||
# backend: | ||
# build: | ||
# context: ./etaireia-backend | ||
|
@@ -72,5 +109,37 @@ services: | |
# depends_on: | ||
# - etaireia-mongo | ||
|
||
#----------------------------------------- | ||
# Storage | ||
#----------------------------------------- | ||
|
||
postgres: | ||
image: "postgres:13.7" | ||
hostname: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_USER: "postgres" | ||
POSTGRES_PASSWORD: "password" | ||
PGDATA: "/data/postgres" | ||
labels: | ||
- "dev-kit.provided=true" | ||
volumes: | ||
- postgres-db-data:/data/postgres | ||
- ../init/postgres/pginit.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql | ||
|
||
mongo: | ||
image: mongo:latest | ||
restart: on-failure | ||
environment: | ||
MONGO_INITDB_DATABASE: ${DATABASE_NAME} | ||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} | ||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} | ||
volumes: | ||
- ./data/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro | ||
- mongodb_data_container:/data/db | ||
ports: | ||
- "27017:27017" | ||
|
||
volumes: | ||
postgres-db-data: | ||
mongodb_data_container: |
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,16 @@ | ||
|
||
CREATE USER etaireia WITH PASSWORD '12345'; | ||
|
||
ALTER USER etaireia CREATEDB; | ||
|
||
GRANT ALL on tablespace pg_default to etaireia; | ||
|
||
CREATE DATABASE signature | ||
WITH | ||
OWNER = etaireia | ||
ENCODING = 'UTF8' | ||
LC_COLLATE = 'en_US.utf8' | ||
LC_CTYPE = 'en_US.utf8' | ||
TABLESPACE = pg_default | ||
CONNECTION LIMIT = -1; | ||
|
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,9 @@ | ||
{ | ||
"keys": [ | ||
"f0d669c66c7434dcc286ada6051d45952fe7ec01791e1b3d90aa2306da8cbb59" | ||
], | ||
"keys_base64": [ | ||
"8NZpxmx0NNzChq2mBR1FlS/n7AF5Hhs9kKojBtqMu1k=" | ||
], | ||
"root_token": "hvs.oXoXejkgBNrrgaNyAyQwnlk3" | ||
} |
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,18 @@ | ||
{ | ||
"storage": { | ||
"file": { | ||
"path": "/vault/file" | ||
} | ||
}, | ||
"listener": [ | ||
{ | ||
"tcp": { | ||
"address": "0.0.0.0:8200", | ||
"tls_disable": true | ||
} | ||
} | ||
], | ||
"default_lease_ttl": "168h", | ||
"max_lease_ttl": "720h", | ||
"ui": true | ||
} |
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,10 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* |
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 @@ | ||
engine-strict=true | ||
resolution-mode=highest |
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,38 @@ | ||
# create-svelte | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). | ||
|
||
## Creating a project | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
``` | ||
|
||
## Developing | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
|
||
```bash | ||
npm run dev | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
|
||
## Building | ||
|
||
To create a production version of your app: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. |
Oops, something went wrong.