-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 1.08 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
version: '3.8'
services:
waistline-api:
image: waistlineapi/waistline-api:latest
container_name: waistline-api
depends_on:
- postgres
- mongodb
volumes:
- .env.local:/var/www/html/.env.local
- ./data/log:/var/log/apache2/ #optional
ports:
- "8081:80"
healthcheck:
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/api/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
interval: 60s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
postgres:
image: postgres:16.1
container_name: waistline-api_postgres
environment:
POSTGRES_DB: 'waistline'
POSTGRES_USER: 'app'
POSTGRES_PASSWORD: '!ChangeMe!'
volumes:
- ./data/postgres:/var/lib/postgresql/data
restart: unless-stopped
mongodb:
image: mongo:7.0
container_name: waistline-api_mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: 'root'
MONGO_INITDB_ROOT_PASSWORD: '!ChangeMe!'
volumes:
- ./data/mongodb:/data/db
restart: unless-stopped