-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 768 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (30 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: run-postgres clean run-redis
PG_USER := logiconnect
PG_PASSWORD := logiconnect@12345
PG_DB := logiconnectDB
run-redis:
docker run -d \
--name redis-stack \
-p 6379:6379 \
-p 8001:8001 \
redis/redis-stack:latest
run-postgres:
docker run --name my-postgres -d \
-e POSTGRES_USER=$(PG_USER) \
-e POSTGRES_PASSWORD=$(PG_PASSWORD) \
-e POSTGRES_DB=$(PG_DB) \
-p 5432:5432 \
postgres:latest
# Run all services
run-all: run-postgres run-redis
# Clean up
clean:
docker stop my-postgres redis-stack run-services || true
docker rm my-postgres redis-stack run-services || true
# DOcker compose run and clean services
.PHONY: run-services
run-services:
docker-compose up --build
.PHONY: clean-services
clean-services:
docker-compose down