update
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
.idea/
|
||||
|
||||
deploy/*.local.yml
|
||||
|
||||
15
.gitmodules
vendored
15
.gitmodules
vendored
@@ -1,15 +0,0 @@
|
||||
[submodule "services/basket"]
|
||||
path = services/basket
|
||||
url = git@git.pbiernat.dev:egommerce/basket-service.git
|
||||
[submodule "services/catalog"]
|
||||
path = services/catalog
|
||||
url = git@git.pbiernat.dev:egommerce/catalog-service.git
|
||||
[submodule "services/identity"]
|
||||
path = services/identity
|
||||
url = git@git.pbiernat.dev:egommerce/identity-service.git
|
||||
[submodule "services/notification"]
|
||||
path = services/notification
|
||||
url = git@git.pbiernat.dev:egommerce/notification-service.git
|
||||
[submodule "services/ordering"]
|
||||
path = services/ordering
|
||||
url = git@git.pbiernat.dev:egommerce/ordering-service.git
|
||||
@@ -1,3 +1,3 @@
|
||||
# application
|
||||
# stack
|
||||
|
||||
Main application - includes all microservices
|
||||
Egommerce docker stack
|
||||
9
deploy/db_migrations/001_create_identity_svc_db.sql
Normal file
9
deploy/db_migrations/001_create_identity_svc_db.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- TODO: Add variables for db, user name, etc...
|
||||
|
||||
CREATE DATABASE svc_identity
|
||||
WITH
|
||||
OWNER = postgres
|
||||
ENCODING = 'UTF8'
|
||||
CONNECTION LIMIT = -1;
|
||||
|
||||
GRANT ALL ON DATABASE svc_identity TO postgres;
|
||||
21
deploy/egommerce-stack.dev.yml
Normal file
21
deploy/egommerce-stack.dev.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres_svc:
|
||||
ports:
|
||||
- '5432:5432'
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=12345678
|
||||
|
||||
identity_svc:
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres_svc:5432/egommerce
|
||||
|
||||
basket_svc:
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres_svc:5432/egommerce
|
||||
|
||||
volumes:
|
||||
postgres_data: ~
|
||||
51
deploy/egommerce-stack.yml
Normal file
51
deploy/egommerce-stack.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres_svc:
|
||||
image: postgres:14.1-alpine
|
||||
# hostname: postgres
|
||||
environment:
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=SuPerTrudneHasloNaKoniecTrzebaWygenerowac
|
||||
networks:
|
||||
- postgres_network
|
||||
|
||||
apigw_svc:
|
||||
image: git.pbiernat.dev/egommerce/apigw-svc:latest # fixme :stable
|
||||
networks:
|
||||
- apigw_network
|
||||
- identity_network
|
||||
- basket_network
|
||||
|
||||
identity_svc:
|
||||
image: git.pbiernat.dev/egommerce/identity-svc:latest # fixme :stable
|
||||
environment:
|
||||
- DATABASE_URL=postgres://PROD_IDENTITY_USER:PROD_PASS@postgres_svc:5432/PROD_DATABASE
|
||||
networks:
|
||||
- identity_network
|
||||
- postgres_network
|
||||
|
||||
basket_svc:
|
||||
image: egommerce_basket:latest
|
||||
environment:
|
||||
- DATABASE_URL=postgres://PROD_BASKET_USER:PROD_PASS@postgres_svc:5432/PROD_DATABASE
|
||||
networks:
|
||||
- basket_network
|
||||
- postgres_network
|
||||
|
||||
networks:
|
||||
postgres_network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
apigw_network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
identity_network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
basket_network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
10
deploy/stack-start.sh
Normal file
10
deploy/stack-start.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# FIX paths...
|
||||
|
||||
echo "Starting egommerce stack..."
|
||||
docker stack deploy --with-registry-auth \
|
||||
--compose-file deployments/egommerce-stack.yml \
|
||||
--compose-file deployments/egommerce-stack.dev.yml \
|
||||
--compose-file deployments/egommerce-stack.dev.local.yml \
|
||||
egommerce
|
||||
echo "Done."
|
||||
Submodule services/basket deleted from c4134dc7a2
Submodule services/catalog deleted from cc115fb4c9
Submodule services/identity deleted from 748b631d0c
Submodule services/notification deleted from a939b791ad
Submodule services/ordering deleted from 508ae5a554
Reference in New Issue
Block a user