librectf-rust/docker-compose.yml

57 lines
1.3 KiB
YAML

version: "3"
services:
nginx:
image: nginx
ports: [3000:80]
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/easyctf.conf:/etc/nginx/conf.d/default.conf
- ./ctf-data/filestore:/var/opt/filestore
app:
build: server
depends_on: [db, files]
volumes:
- ./server:/app
environment:
- SECRET_KEY=ad88fec19a7641e5de308e45dd4fa1c5
- DATABASE_URL=mysql://app:hellosu@db:3306/app
- S3_RESOURCE=http://minio:9000
- FILESTORE_SAVE_ENDPOINT=http://files:5000/save
- CACHE_REDIS_HOST=redis
- WAIT_HOSTS=db:3306
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=10
- WAIT_HOST_CONNECT_TIMEOUT=30
db:
image: mariadb
expose: [3306]
volumes:
- ./db/init.d:/docker-entrypoint-initdb.d
- ./ctf-data/mariadb:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=45694fd9e39afc4a3597bc2797620e15
files:
build: filestore
expose: [5000]
volumes:
- ./filestore:/app
- ./ctf-data/filestore:/data
environment:
- UPLOAD_FOLDER=/data/static
- FILESTORE_PORT=5000
minio:
image: minio/minio
ports: [9000:9000, 9001:9001]
volumes:
- ./ctf-data/minio:/data
command: server --address 0.0.0.0:9000 /data
redis:
image: redis