update
This commit is contained in:
parent
a811386ee3
commit
2da3dd13d1
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
.idea/
|
.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."
|
@ -1 +0,0 @@
|
|||||||
Subproject commit c4134dc7a28956a7124ffbf2891c2762e7d916ce
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit cc115fb4c989000b8d056773903787871a95d842
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 748b631d0c805b3a4c082ab5962fec0e4815e643
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit a939b791aded01fa14413a6e98eb03cbfe4801e2
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 508ae5a554193b98957ef5b66853df5c8986fbc0
|
|
Loading…
Reference in New Issue
Block a user