forked from jjrom/resto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (56 loc) · 1.49 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
volumes:
database_data:
driver: local
static_content:
driver: local
networks:
default:
driver: bridge
external:
external: true
name: rnet
services:
resto:
image: jjrom/resto:latest
restart: unless-stopped
build:
context: ./
dockerfile: ./build/resto/Dockerfile
networks:
- default
- external
ports:
- ${RESTO_EXPOSED_PORT:-5252}:80
env_file:
- ${ENV_FILE:-config.env}
environment:
### Set to 0 in production environment to activate opcache
- RESTO_DEBUG=0
### Set to 1 in production environment to activate opcache preloading
- PHP_OPCACHE_ENABLE_PRELOADING=1
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1/_isLive"]
interval: 1m
timeout: 5s
volumes:
- static_content:/var/www/static
restodb:
image: postgis/postgis:16-master
restart: unless-stopped
command: ["postgres", "-c", "config_file=/etc/postgresql.conf"]
# Upgrade shared_memory for complex queries
shm_size: '2gb'
networks:
- default
- external
environment:
- POSTGRES_PASSWORD=${DATABASE_USER_PASSWORD:-resto}
- POSTGRES_USER=${DATABASE_USER_NAME:-resto}
- POSTGRES_DB=${DATABASE_NAME:-resto}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER_NAME:-resto}"]
interval: 1m
timeout: 5s
volumes:
- database_data:/var/lib/postgresql/data
- ./postgresql-conf/postgresql.conf:/etc/postgresql.conf