feat: Add Docker Compose profiles for auth and payment services
This commit is contained in:
14
Makefile
Normal file
14
Makefile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
up-auth:
|
||||||
|
docker compose --profile auth up -d
|
||||||
|
|
||||||
|
down-auth:
|
||||||
|
docker compose --profile auth down
|
||||||
|
|
||||||
|
up-payment:
|
||||||
|
docker compose --profile payment up -d
|
||||||
|
|
||||||
|
down-payment:
|
||||||
|
docker compose --profile payment down
|
||||||
|
|
||||||
|
down-all:
|
||||||
|
docker compose --profile payment --profile auth down
|
||||||
@@ -39,6 +39,8 @@ services:
|
|||||||
dockerfile: ./docker/Dockerfile.nginx
|
dockerfile: ./docker/Dockerfile.nginx
|
||||||
depends_on:
|
depends_on:
|
||||||
- auth
|
- auth
|
||||||
|
profiles:
|
||||||
|
- auth
|
||||||
auth:
|
auth:
|
||||||
networks:
|
networks:
|
||||||
- lamenu
|
- lamenu
|
||||||
@@ -56,6 +58,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- auth-db
|
- auth-db
|
||||||
- redis
|
- redis
|
||||||
|
profiles:
|
||||||
|
- auth
|
||||||
auth-db:
|
auth-db:
|
||||||
networks:
|
networks:
|
||||||
- lamenu
|
- lamenu
|
||||||
@@ -67,6 +71,24 @@ services:
|
|||||||
POSTGRES_PASSWORD: '2309'
|
POSTGRES_PASSWORD: '2309'
|
||||||
volumes:
|
volumes:
|
||||||
- pg_data:/var/lib/postgresql/data
|
- pg_data:/var/lib/postgresql/data
|
||||||
|
profiles:
|
||||||
|
- auth
|
||||||
|
|
||||||
|
payment:
|
||||||
|
networks:
|
||||||
|
- lamenu
|
||||||
|
build:
|
||||||
|
context: ./services/payment
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- JWT_KEY=${JWT_KEY}
|
||||||
|
volumes:
|
||||||
|
- ./services/payment:/code
|
||||||
|
- pycache:/var/cache/pycache
|
||||||
|
profiles:
|
||||||
|
- payment
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
networks:
|
networks:
|
||||||
- lamenu
|
- lamenu
|
||||||
|
|||||||
3
services/payment/Dockerfile
Normal file
3
services/payment/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
CMD ["sleep", "60"]
|
||||||
Reference in New Issue
Block a user