-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 2.09 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: grocerease-v2
services:
app:
build:
context: .
dockerfile: Dockerfile
image: grocerease-v2:latest
container_name: grocerease_app
restart: unless-stopped
ports:
- "${PORT:-80}:80"
environment:
APP_NAME: "${APP_NAME:-GrocerEase}"
APP_ENV: "${APP_ENV:-production}"
APP_KEY: "${APP_KEY}"
APP_DEBUG: "${APP_DEBUG:-false}"
APP_URL: "${APP_URL:-http://localhost}"
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: "${DB_DATABASE:-grocerease_db}"
DB_USERNAME: "${DB_USERNAME:-grocerease_user}"
DB_PASSWORD: "${DB_PASSWORD:-secret_password}"
CACHE_STORE: redis
SESSION_DRIVER: redis
QUEUE_CONNECTION: redis
REDIS_HOST: redis
REDIS_PORT: 6379
FILESYSTEM_DISK: "${FILESYSTEM_DISK:-local}"
volumes:
- storage-data:/var/www/html/storage/app/public
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- grocerease-net
postgres:
image: postgres:16-alpine
container_name: grocerease_postgres
restart: unless-stopped
environment:
POSTGRES_DB: "${DB_DATABASE:-grocerease_db}"
POSTGRES_USER: "${DB_USERNAME:-grocerease_user}"
POSTGRES_PASSWORD: "${DB_PASSWORD:-secret_password}"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-grocerease_user} -d ${DB_DATABASE:-grocerease_db}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- grocerease-net
redis:
image: redis:7-alpine
container_name: grocerease_redis
restart: unless-stopped
command: redis-server --save 60 1 --loglevel notice
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- grocerease-net
networks:
grocerease-net:
driver: bridge
volumes:
postgres-data:
driver: local
redis-data:
driver: local
storage-data:
driver: local