feat(DRW-001) example docker-compose
This commit is contained in:
@@ -0,0 +1,64 @@
|
|||||||
|
services:
|
||||||
|
dota-random-pg:
|
||||||
|
container_name: dota-random-pg
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 1gb
|
||||||
|
reservations:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 256m
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=<db_name>
|
||||||
|
- POSTGRES_USER=<user>
|
||||||
|
- POSTGRES_PASSWORD=<password>
|
||||||
|
healthcheck:
|
||||||
|
interval: 10s
|
||||||
|
retries: 5
|
||||||
|
test:
|
||||||
|
- CMD-SHELL
|
||||||
|
- pg_isready -U <username> -d <db_name>
|
||||||
|
image: postgres:15-alpine
|
||||||
|
ports:
|
||||||
|
- host_ip: 192.168.1.14
|
||||||
|
protocol: tcp
|
||||||
|
published: 5433
|
||||||
|
target: 5432
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- <your_path_here>:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
dota-random-web:
|
||||||
|
container_name: dota-random-web
|
||||||
|
depends_on:
|
||||||
|
dota-random-pg:
|
||||||
|
condition: service_healthy
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 512m
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 128m
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=postgres://<username>:<password>@<ip/domain>:5432/<db_name>
|
||||||
|
- NEUTRAL_ROLL_HIT_CHANCE=0.5
|
||||||
|
- RUST_LOG=info
|
||||||
|
image: <your_image_here>
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
dota-random-web-frontend:
|
||||||
|
container_name: dota-random-web-frontend
|
||||||
|
depends_on:
|
||||||
|
- dota-random-web
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128m
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 32m
|
||||||
|
image: <your_image_here>
|
||||||
Reference in New Issue
Block a user