-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (95 loc) · 2.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (95 loc) · 2.94 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
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
services:
# Midnight Proof Server - Required for ZK proof generation
proof-server:
image: midnightnetwork/proof-server:latest
container_name: midnight-proof-server
ports:
- "6300:6300"
command: ["midnight-proof-server", "--network", "testnet"]
restart: unless-stopped
networks:
- midnight-network
# Elections API - Node.js/Express API for contract interactions
elections-api:
build:
context: .
dockerfile: Dockerfile.elections-api
container_name: elections-api
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- PROOF_SERVER=http://proof-server:6300
- MIDNIGHT_INDEXER=https://indexer.testnet-02.midnight.network/api/v1/graphql
- MIDNIGHT_INDEXER_WS=wss://indexer.testnet-02.midnight.network/api/v1/graphql/ws
- MIDNIGHT_NODE=https://rpc.testnet-02.midnight.network
volumes:
- .:/app
- /app/node_modules
- ./midnight-level-db:/app/midnight-level-db
- ./contracts:/app/contracts
depends_on:
- proof-server
restart: unless-stopped
networks:
- midnight-network
command: node dist-elections-api/server.js
# Laravel Web Application
web:
build:
context: ./web/www
dockerfile: Dockerfile
container_name: midnight-web
ports:
- "8001:8000"
environment:
- APP_ENV=local
- APP_DEBUG=true
- APP_URL=https://midnight.dev.v2.sk
- DB_CONNECTION=sqlite
- DB_DATABASE=/app/database/database.sqlite
- QUEUE_CONNECTION=database
- CACHE_STORE=database
- SESSION_DRIVER=database
- ELECTIONS_API_URL=http://elections-api:3000
- AUTO_MIGRATE=true
- AUTO_SEED=true
volumes:
- ./web/www:/app
- /app/node_modules
- ./web/www/database/database.sqlite:/app/database/database.sqlite
- ./web/laravel-midnight:/app/vendor/versiontwo/midnight-laravel:ro
- ./web/www/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh:ro
depends_on:
- elections-api
restart: unless-stopped
networks:
- midnight-network
# Command handled by entrypoint script
# Queue Worker for background jobs
queue-worker:
image: contract-web:latest
container_name: midnight-queue
environment:
- APP_ENV=local
- DB_CONNECTION=sqlite
- DB_DATABASE=/app/database/database.sqlite
- QUEUE_CONNECTION=database
- AUTO_MIGRATE=false
- AUTO_SEED=false
volumes:
- ./web/www:/app
- ./web/www/database/database.sqlite:/app/database/database.sqlite
- ./web/laravel-midnight:/app/vendor/versiontwo/midnight-laravel:ro
- ./web/www/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh:ro
depends_on:
- web
restart: unless-stopped
networks:
- midnight-network
entrypoint: ["/sbin/tini", "--"]
command: ["php", "artisan", "queue:work", "--tries=3", "--sleep=3"]
networks:
midnight-network:
driver: bridge