Update docker-compose to use prebuilt images where possible and migrate
to valckey
This commit is contained in:
+8
-14
@@ -17,21 +17,18 @@ services:
|
|||||||
REDIS_URL: redis://redis:6379/0?decode_responses=True
|
REDIS_URL: redis://redis:6379/0?decode_responses=True
|
||||||
API_URL: http://api:80
|
API_URL: http://api:80
|
||||||
api:
|
api:
|
||||||
build: &build_cfg
|
image: ghcr.io/mawoka-myblock/classquiz-backend:master
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
restart: &restart always
|
restart: &restart always
|
||||||
depends_on: &depends
|
depends_on: &depends
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
environment: &env_vars
|
environment: &env_vars # --- DON'T CHANGE FROM HERE ---
|
||||||
# --- DON'T CHANGE FROM HERE ---
|
|
||||||
DB_URL: "postgresql://postgres:classquiz@db:5432/classquiz" # DON'T CHANGE
|
DB_URL: "postgresql://postgres:classquiz@db:5432/classquiz" # DON'T CHANGE
|
||||||
REDIS: "redis://redis:6379/0?decode_responses=True" # DON'T CHANGE
|
REDIS: "redis://redis:6379/0?decode_responses=True" # DON'T CHANGE
|
||||||
SECRET_KEY: "TOP_SECRET" # Don't change it manually, use the one-liner provided in the documentation
|
SECRET_KEY: "TOP_SECRET" # Don't change it manually, use the one-liner provided in the documentation
|
||||||
MAX_WORKERS: "1" # Very important and DON'T CHANGE
|
MAX_WORKERS: "1" # Very important and DON'T CHANGE
|
||||||
ACCESS_TOKEN_EXPIRE_MINUTES: 30 # DON'T CHANGE
|
ACCESS_TOKEN_EXPIRE_MINUTES: 30 # DON'T CHANGE
|
||||||
MEILISEARCH_URL: "http://meilisearch:7700" # DON'T CHANGE
|
MEILISEARCH_URL: "http://meilisearch:7700" # DON'T CHANGE
|
||||||
# -- DON'T CHANGE TILL HERE ---
|
# -- DON'T CHANGE TILL HERE ---
|
||||||
|
|
||||||
@@ -76,16 +73,16 @@ services:
|
|||||||
- ./uploads:/app/data
|
- ./uploads:/app/data
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: valckey:alpine
|
||||||
restart: always
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli","ping" ]
|
test: ["CMD", "valkey-cli", "ping"]
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
restart: always
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -95,10 +92,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- data:/var/lib/postgresql/data
|
- data:/var/lib/postgresql/data
|
||||||
proxy:
|
proxy:
|
||||||
image: caddy:alpine
|
image: ghcr.io/mawoka-myblock/classquiz-caddy:master
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
|
||||||
- ./Caddyfile-docker:/etc/caddy/Caddyfile
|
|
||||||
ports:
|
ports:
|
||||||
- "8000:8080" # The 8000 can be changed.
|
- "8000:8080" # The 8000 can be changed.
|
||||||
meilisearch:
|
meilisearch:
|
||||||
@@ -109,13 +104,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- meilisearch-data:/data.ms
|
- meilisearch-data:/data.ms
|
||||||
worker:
|
worker:
|
||||||
build: *build_cfg
|
image: ghcr.io/mawoka-myblock/classquiz-backend:master
|
||||||
environment: *env_vars
|
environment: *env_vars
|
||||||
depends_on: *depends
|
depends_on: *depends
|
||||||
restart: *restart
|
restart: *restart
|
||||||
command: arq classquiz.worker.WorkerSettings
|
command: arq classquiz.worker.WorkerSettings
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
meilisearch-data:
|
meilisearch-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user