-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
85 lines (80 loc) · 1.89 KB
/
docker-compose.yml
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
85
version: "3.7"
# Named volumes
volumes:
api_proposta-temp-config:
driver: local
# ~/.local
api_proposta-temp-local:
driver: local
api_proposta-temp-cache:
driver: local
# ~/.composer
api_proposta-temp-composer:
driver: local
# cache
api_proposta-redis-data:
driver: local
# Database
api_proposta-postgres-data:
driver: local
services:
# smtp
smtp:
image: mailhog/mailhog:latest
ports:
# - "${DOCKER_SMTP_PORT:-33025}:1025"
- "${DOCKER_WEBMAIL_PORT:-33080}:8025"
api:
build:
context: .
command: "dev"
# ports:
# - "${DOCKER_API_HTTP_PORT:-9000}:80"
environment:
- XDEBUG_ENABLED=${APP_XDEBUG_ENABLED:-false}
- OPCACHE_MODE=${APP_OPCACHE_MODE:-disabled}
- JWT_TTL=720
- MIGRATE=${APP_MIGRATE:-true}
- LARAVEL_CACHE=${LARAVEL_CACHE:-false}
volumes:
- .:/app
- api_proposta-temp-config:/home/app/.config
- api_proposta-temp-cache:/home/app/.cache
- api_proposta-temp-local:/home/app/.local
- api_proposta-temp-composer:/home/app/.composer
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/v1/.healthcheck"]
interval: 5m
timeout: 20s
retries: 10
start_period: 30s
links:
- db
- cache
depends_on:
- db
- cache
# REDIS
cache:
image: redis:5
restart: ${DOCKER_RESTART:-always}
command: --appendonly yes
volumes:
- api_proposta-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 30s
timeout: 10s
retries: 3
# db
db:
image: postgres:13.0-alpine
restart: "no"
# ports:
# - "${DOCKER_DB_PORT:-7322}:5432"
environment:
- POSTGRES_DB=proposta
- POSTGRES_USER=proposta
- POSTGRES_PASSWORD=proposta
volumes:
- api_proposta-postgres-data:/var/lib/postgresql/data