-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (34 loc) · 1.28 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
MAKEFLAGS += -j2
prod-init: prod-nginx-link
#### DEV COMMANDS ####
dev-start:
docker compose --file ./docker-compose.dev.yml up -d
dev-stop:
docker compose --file ./docker-compose.dev.yml down
dev-rebuild:
docker compose --file ./docker-compose.dev.yml up -d --build --force-recreate
### PRODUCTION COMMANDS
# prod-start:
# docker compose --env-file .env --file ./docker-compose.yml up -d
# prod-rebuild:
# docker compose --env-file .env --file ./docker-compose.yml up -d --build
# prod-restart:
# docker compose --env-file .env --file ./docker-compose.yml up -d --force-recreate
# prod-stop:
# docker compose --env-file .env --file ./docker-compose.yml down
# docker swarm
STACK_NAME = sykofizz
COMPOSE_FILE = ./deployment/docker/docker-swarm.yml
prod-start:
docker stack deploy -c $(COMPOSE_FILE) $(STACK_NAME) --detach=true
prod-update: prod-start
prod-stop:
docker stack stop $(STACK_NAME) # Stops services without removing configuration.
prod-rm:
docker stack rm $(STACK_NAME) # Removes the stack and all associated resources.
prod-nginx-link-common:
ln -s ${shell pwd}/nginx/common.conf /etc/nginx/
ln -s ${shell pwd}/nginx/proxy_common.conf /etc/nginx/
prod-nginx-link:
ln -s ${shell pwd}/deployment/nginx/vhost.conf /etc/nginx/sites-enabled/sykofizz.conf
nginx -s reload