-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
113 lines (105 loc) · 2.32 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '3.9'
services:
backend:
build:
context: ./backend
dockerfile: ./Dockerfile
target: production
image: dirtviz-backend
environment:
- DB_USER=dirtviz
- DB_PASS=password
- DB_HOST=postgresql
- DB_PORT=5432
- DB_DATABASE=dirtviz
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
# uncomment to run local .env, comment for testing
# env_file:
# - ./.env
ports:
- '8000:8000'
depends_on:
- postgresql
volumes:
- './backend:/app/backend'
worker:
build:
context: ./backend
target: prodworker
environment:
- DB_USER=dirtviz
- DB_PASS=password
- DB_HOST=postgresql
- DB_PORT=5432
- DB_DATABASE=dirtviz
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
# uncomment to run local .env, comment for testing
# env_file:
# - ./.env
depends_on:
- backend
- redis
volumes:
- './backend:/app/backend'
frontend:
build:
context: ./frontend
dockerfile: ./Dockerfile
target: production
image: dirtviz-frontend
ports:
- '3000:80'
depends_on:
- backend
tty: true
volumes:
- './frontend/src:/app/src'
redis:
image: redis:latest
ports:
- '6379:6379'
postgresql:
image: postgres:16
environment:
POSTGRES_USER: dirtviz
POSTGRES_PASSWORD: password
POSTGRES_DB: dirtviz
ports:
- '5432:5432'
volumes:
- postgresql-16-data:/var/lib/postgresql/data
networks:
default:
deploy:
resources:
limits:
memory: 4g
reservations:
memory: 3g
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4_container
restart: always
ports:
- '8888:80'
environment:
PGADMIN_DEFAULT_EMAIL: user-name@domain-name.com
PGADMIN_DEFAULT_PASSWORD: strong-password
volumes:
- pgadmin-data:/var/lib/pgadmin
phpredisadmin:
image: erikdubbelboer/phpredisadmin
environment:
- ADMIN_USER=admin
- ADMIN_PASS=admin
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
links:
- redis
ports:
- '80:80'
volumes:
postgresql-16-data:
pgadmin-data: