Inited projects
This commit is contained in:
0
.env.example
Normal file
0
.env.example
Normal file
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
nats.conf
|
||||||
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
nats:
|
||||||
|
image: nats:latest
|
||||||
|
container_name: nats-server
|
||||||
|
ports:
|
||||||
|
- "4222:4222"
|
||||||
|
- "8222:8222"
|
||||||
|
volumes:
|
||||||
|
- ./nats.conf:/etc/nats/nats.conf
|
||||||
|
command: "-c /etc/nats/nats.conf"
|
||||||
|
|
||||||
|
api:
|
||||||
|
build: ./src/api
|
||||||
|
depends_on:
|
||||||
|
- nats
|
||||||
|
environment:
|
||||||
|
NATS_URL: "nats://api_service:password@nats:4222"
|
||||||
|
|
||||||
|
storage:
|
||||||
|
build: ./src/storage
|
||||||
|
depends_on:
|
||||||
|
- nats
|
||||||
|
- api
|
||||||
|
environment:
|
||||||
|
NATS_URL: "nats://storage_service:password@nats:4222"
|
||||||
|
|
||||||
|
vault:
|
||||||
|
build: ./src/vault
|
||||||
|
depends_on:
|
||||||
|
- nats
|
||||||
|
- api
|
||||||
|
environment:
|
||||||
|
NATS_URL: "nats://vault_service:password@nats:4222"
|
||||||
32
nats.example.conf
Normal file
32
nats.example.conf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
listen: 4222
|
||||||
|
|
||||||
|
accounts {
|
||||||
|
APP {
|
||||||
|
users [
|
||||||
|
{
|
||||||
|
user: "api_service",
|
||||||
|
password: "api_password",
|
||||||
|
permissions: {
|
||||||
|
publish: ["files.upload", "vault.get"],
|
||||||
|
subscribe: ["vault.response"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
user: "storage_service",
|
||||||
|
password: "storage_password",
|
||||||
|
permissions: {
|
||||||
|
subscribe: ["files.upload"],
|
||||||
|
publish: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
user: "vault_service",
|
||||||
|
password: "vault_password",
|
||||||
|
permissions: {
|
||||||
|
subscribe: ["vault.get"],
|
||||||
|
publish: ["vault.response"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
0
src/api/Dockerfile
Normal file
0
src/api/Dockerfile
Normal file
3
src/api/go.mod
Normal file
3
src/api/go.mod
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module thelanc3.ru/memome/v2/api
|
||||||
|
|
||||||
|
go 1.26.1
|
||||||
1
src/api/main.go
Normal file
1
src/api/main.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package api
|
||||||
0
src/storage/Dockerfile
Normal file
0
src/storage/Dockerfile
Normal file
3
src/storage/go.mod
Normal file
3
src/storage/go.mod
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module thelanc3.ru/memome/v2/storage
|
||||||
|
|
||||||
|
go 1.26.1
|
||||||
0
src/vault/Dockerfile
Normal file
0
src/vault/Dockerfile
Normal file
3
src/vault/go.mod
Normal file
3
src/vault/go.mod
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module thelanc3.ru/memome/v2/vault
|
||||||
|
|
||||||
|
go 1.26.1
|
||||||
0
src/web/Dockerfile
Normal file
0
src/web/Dockerfile
Normal file
Reference in New Issue
Block a user