-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-entrypoint.sh
52 lines (49 loc) · 1.37 KB
/
docker-entrypoint.sh
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
48
49
50
51
52
#!/usr/bin/env bash
args=("$@")
case "${1}" in
"build")
docker build -t fast_drew_dru:latest -f Dockerfile .
;;
# region db
"run-db")
docker run \
-v $(pwd)/data:/docker-entrypoint-initdb.d \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=user \
-e POSTGRES_DB=postgres \
-p 5433:5432 \
--restart=always \
-it postgres
;;
# endregion
# region app
"run-admin")
docker run \
-p 8810:8810 \
-e .env.docker \
--restart=always \
-it fast_drew_dru:latest \
bash -c "./run.sh --docker"
;;
# endregion
# region celery
# "run-redis")
# docker run \
# -v $(pwd)/redis.conf:/usr/local/etc/redis/redis.conf \
# -e .env.celery \
# -p 6379:6379 \
# --restart=always \
# --sysctl net.core.somaxconn=1024\
# -it redis:latest \
# bash -c "redis-server --appendonly yes --maxmemory 2048mb"
# ;;
# "run-celery")
# docker run \
# -e .env.celery \
# --user python \
# --restart=always \
# -it pyimg2:latest \
# bash -c "celery worker -A coreMA.shared.workers:celery --loglevel=info -B"
# ;;
# endregion
esac