-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
143 lines (143 loc) · 4.28 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: '3'
services:
chainvote.next:
image: nextjs/chainvote
build:
context: lucid
dockerfile: Dockerfile.dev
container_name: chainvote.next
command: npx nest start --watch
expose:
- "3000"
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ./application/.env
volumes:
- './lucid:/usr/src/app'
networks:
- chainvote
chainvote.lucid:
image: nodejs/chainvote
build:
context: serverless-lucid
dockerfile: Dockerfile
container_name: chainvote.lucid
ports:
- '3000:80'
volumes:
- './serverless-lucid/lib:/code/lib'
- './serverless-lucid/routes:/code/routes'
env_file:
- ./serverless-lucid/.env
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
- chainvote
chainvote.test:
build:
context: application/vendor/laravel/sail/runtimes/8.2
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.2/chainvote
container_name: chainvote.test
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '8080:${APP_PORT:-80}'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
env_file:
- ./application/.env
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
APP_SERVICE: ${APP_SERVICE:-chainvote.test}
XDEBUG_MODE: ${SAIL_XDEBUG_MODE:-off}
XDEBUG_CONFIG: ${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}
volumes:
- './application:/var/www/html'
networks:
- chainvote
depends_on:
- chainvote.lucid
- chainvote.db
- chainvote.redis
chainvote.queue:
build:
context: application/vendor/laravel/sail/runtimes/8.2
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.2/chainvote
container_name: chainvote.queue
command: 'php artisan horizon'
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ./application/.env
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
APP_SERVICE: ${APP_SERVICE:-chainvote.queue}
XDEBUG_MODE: ${SAIL_XDEBUG_MODE:-off}
XDEBUG_CONFIG: ${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}
volumes:
- './application:/var/www/html'
networks:
- chainvote
depends_on:
- chainvote.db
- chainvote.redis
chainvote.db:
image: postgres:15.2-alpine3.17
container_name: chainvotedb
environment:
POSTGRES_LOGGING: 'true'
POSTGRES_DB: '${POSTGRES_DATABASE:-governor}'
POSTGRES_USER: '${POSTGRES_USERNAME:-cardano}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-MdT6Sc7XfrpCMJw4D}'
POSTGRES_POSTGRES_PASSWORD: '${POSTGRES_ROOT_PASSWORD:-bVd95i3mUPLKYqGVCRtN}'
ports:
- "${POSTGRES_PORT:-5436}:5432"
healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 10s
timeout: 2s
retries: 10
volumes:
- type: volume
source: chainvote-db
target: /var/lib/postgresql/data
volume:
nocopy: true
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
networks:
- chainvote
chainvote.redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'chainvote-redis:/data'
networks:
- chainvote
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
networks:
chainvote:
driver: bridge
volumes:
chainvote-db:
driver: local
chainvote-redis:
driver: local