mirror of
https://github.com/status-im/nft-proxy.git
synced 2026-08-27 18:31:11 +00:00
84 lines
2.0 KiB
YAML
84 lines
2.0 KiB
YAML
---
|
|
services:
|
|
# Nginx proxy with auth
|
|
nginx-proxy:
|
|
build:
|
|
context: './nginx-proxy'
|
|
container_name: 'nft-nginx-proxy'
|
|
restart: 'always'
|
|
environment:
|
|
GO_AUTH_SERVICE_URL: 'http://auth-service:8081'
|
|
AUTH_CONFIG_FILE: '/app/auth_config.json'
|
|
GO_NFT_PROXY_SOCKET: '/tmp/nft-proxy.sock'
|
|
CUSTOM_DNS: '127.0.0.11'
|
|
ports:
|
|
- '8085:8080'
|
|
networks:
|
|
- 'nft-network'
|
|
depends_on:
|
|
- 'nft-proxy'
|
|
- 'auth-service'
|
|
volumes:
|
|
- './secrets/.htpasswd:/etc/nginx/.htpasswd:ro'
|
|
- './secrets/auth_config.json:/app/auth_config.json:ro'
|
|
- 'nft_proxy_socket:/tmp'
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'nc -z 0.0.0.0 8080 || exit 1']
|
|
interval: '30s'
|
|
timeout: '10s'
|
|
retries: 3
|
|
start_period: '10s'
|
|
|
|
# NFT proxy Go service
|
|
nft-proxy:
|
|
build:
|
|
context: '.'
|
|
dockerfile: 'go-cache/Dockerfile'
|
|
container_name: 'nft-proxy'
|
|
restart: 'always'
|
|
environment:
|
|
ALCHEMY_API_KEY: '${ALCHEMY_API_KEY}'
|
|
CACHE_CONFIG_FILE: '/app/cache_config.yaml'
|
|
CACHE_SOCKET_PATH: '/tmp/nft-proxy.sock'
|
|
METRICS_PORT: '8099'
|
|
networks:
|
|
- 'nft-network'
|
|
volumes:
|
|
- 'nft_proxy_socket:/tmp'
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'test -S /tmp/nft-proxy.sock || exit 1']
|
|
interval: '30s'
|
|
timeout: '10s'
|
|
retries: 3
|
|
start_period: '10s'
|
|
|
|
# Auth service (puzzle + JWT)
|
|
auth-service:
|
|
build:
|
|
context: './go-cache/proxy-common'
|
|
dockerfile: 'auth/Dockerfile'
|
|
container_name: 'nft-auth-service'
|
|
restart: 'always'
|
|
environment:
|
|
CONFIG_FILE: '/app/config.json'
|
|
PORT: '8081'
|
|
ports:
|
|
- '8086:8081'
|
|
networks:
|
|
- 'nft-network'
|
|
volumes:
|
|
- './secrets/auth_config.json:/app/config.json:ro'
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget -q -O - http://0.0.0.0:8081/auth/status || exit 1']
|
|
interval: '30s'
|
|
timeout: '10s'
|
|
retries: 3
|
|
start_period: '10s'
|
|
|
|
volumes:
|
|
nft_proxy_socket:
|
|
|
|
networks:
|
|
nft-network:
|
|
driver: bridge
|