-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 2.1 KB
/
docker-compose.yml
File metadata and controls
72 lines (69 loc) · 2.1 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
services:
app:
image: algertc/alpr-dashboard:latest
restart: unless-stopped
ports:
- "3000:3000" # Change the first port to the port you want to expose
environment:
- NODE_ENV=production
- ADMIN_PASSWORD=password # Change this to a secure password
- DB_PASSWORD=password # Change this to match your postgres password
- TZ= America/Los_Angeles # Change this to match your time zone. Time zones can be found here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
depends_on:
- db
volumes:
- app-auth:/app/auth
- app-config:/app/config
- app-plate_images:/app/storage
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
db:
image: postgres:13
restart: unless-stopped
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password # Change this to a secure password
- TZ= America/Los_Angeles # Change this to match your time zone. Time zones can be found here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
volumes:
- db-data:/var/lib/postgresql/data
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
- ./migrations.sql:/migrations.sql
# Make sure you download the migrations.sql file if you are updating your existing database. If you changed the user or database name, you will need to plug that in in the command below.
command: >
bash -c "
docker-entrypoint.sh postgres &
until pg_isready; do sleep 1; done;
psql -U postgres -d postgres -f /migrations.sql;
wait
"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data:
app-auth:
driver: local
driver_opts:
type: none
o: bind
device: ./auth
app-config:
driver: local
driver_opts:
type: none
o: bind
device: ./config
app-plate_images:
driver: local
driver_opts:
type: none
o: bind
device: ./storage