fp/compose.yml

219 lines
6.5 KiB
YAML

version: '3.4'
services:
chisel:
container_name: fp-chisel
image: jpillora/chisel
ports:
- "9312:9312"
restart: on-failure
command: "client --auth=${CHISEL_AUTH} ${CHISEL_SERVER} R:8899:cluster0:9094 R:8901:link2cid:3939 R:8900:strapi:1337 R:8902:next:3000 R:8903:uppy:3020 R:8904:uppy:8888"
link2cid:
container_name: fp-link2cid
restart: on-failure
build:
context: ./packages/link2cid
dockerfile: Dockerfile
target: dev
ports:
- "3939:3939"
environment:
API_KEY: ${LINK2CID_API_KEY}
IPFS_URL: "http://ipfs0:5001"
PORT: 3939
volumes:
- ./packages/link2cid/index.js:/app/index.js
ipfs0:
container_name: fp-ipfs0
restart: on-failure
image: ipfs/kubo:release
ports:
- "5001:5001"
volumes:
- ./compose/ipfs0:/data/ipfs
cluster0:
container_name: fp-cluster0
image: ipfs/ipfs-cluster:latest
restart: on-failure
depends_on:
- ipfs0
environment:
CLUSTER_PEERNAME: cluster0
CLUSTER_SECRET: ${CLUSTER_SECRET} # From shell variable if set
CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs0/tcp/5001
CLUSTER_CRDT_TRUSTEDPEERS: '*' # Trust all peers in Cluster
CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS: /ip4/0.0.0.0/tcp/9094 # Expose API
CLUSTER_RESTAPI_BASICAUTHCREDENTIALS: ${CLUSTER_RESTAPI_BASICAUTHCREDENTIALS}
CLUSTER_MONITORPINGINTERVAL: 2s # Speed up peer discovery
ports:
- "127.0.0.1:9094:9094"
volumes:
- ./compose/cluster0:/data/ipfs-cluster
strapi:
container_name: fp-strapi
image: fp-strapi:14
build:
context: ./packages/strapi
dockerfile: Dockerfile
restart: on-failure
depends_on:
- db
# env_file: ./packages/strapi/.env
environment:
# ADMIN_PASSWORD: ${STRAPI_ADMIN_PASSWORD}
# ADMIN_EMAIL: ${STRAPI_ADMIN_EMAIL}
BASE_URL: ${STRAPI_BASE_URL}
SMTP_HOST: 172.17.0.1
SMTP_PORT: 25
SMTP_AUTH_STRATEGY: NONE
SMTP_FROM_EMAIL: sender@example.com
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
DATABASE_CLIENT: postgres
DATABASE_HOST: db
DATABASE_PORT: ${POSTGRES_PORT}
DATABASE_NAME: ${POSTGRES_DB}
DATABASE_USERNAME: ${POSTGRES_USER}
DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
JWT_SECRET: ${STRAPI_JWT_SECRET}
ADMIN_JWT_SECRET: ${STRAPI_ADMIN_JWT_SECRET}
APP_KEYS: ${STRAPI_APP_KEYS}
NODE_ENV: ${NODE_ENV}
API_TOKEN_SALT: ${STRAPI_API_TOKEN_SALT}
TRANSFER_TOKEN_SALT: ${STRAPI_TRANSFER_TOKEN_SALT}
MUX_SIGNING_KEY_PRIVATE_KEY: ${MUX_SIGNING_KEY_PRIVATE_KEY}
MUX_SIGNING_KEY_ID: ${MUX_SIGNING_KEY_ID}
MUX_PLAYBACK_RESTRICTION_ID: ${MUX_PLAYBACK_RESTRICTION_ID}
STRAPI_URL: ${STRAPI_URL}
CDN_BUCKET_URL: ${CDN_BUCKET_URL}
CDN_BUCKET_USC_URL: ${CDN_BUCKET_USC_URL}
S3_USC_BUCKET_KEY_ID: ${S3_USC_BUCKET_KEY_ID}
S3_USC_BUCKET_APPLICATION_KEY: ${S3_USC_BUCKET_APPLICATION_KEY}
S3_USC_BUCKET_NAME: ${S3_USC_BUCKET_NAME}
S3_USC_BUCKET_ENDPOINT: ${S3_USC_BUCKET_ENDPOINT}
S3_USC_BUCKET_REGION: ${S3_USC_BUCKET_REGION}
AWS_ACCESS_KEY_ID: ${S3_USC_BUCKET_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${S3_USC_BUCKET_APPLICATION_KEY}
ports:
- "1337:1337"
volumes:
- ./packages/strapi/config:/opt/app/config
- ./packages/strapi/src:/opt/app/src
- ./packages/strapi/database:/opt/app/database
- ./packages/strapi/public/uploads:/opt/app/public/uploads
- ./packages/strapi/package.json:/opt/app/package.json
- ./packages/strapi/yarn.lock:/opt/app/yarn.lock
# - ./packages/strapi/.env:/opt/app/.env
# - ./packages/strapi/entrypoint.sh:/opt/app/entrypoint.sh
next:
container_name: fp-next
build:
context: .
dockerfile: next.Dockerfile
target: dev
restart: on-failure
environment:
REVALIDATION_TOKEN: ${NEXT_REVALIDATION_TOKEN}
NODE_ENV: development
NEXT_PUBLIC_STRAPI_URL: ${NEXT_PUBLIC_STRAPI_URL}
NEXT_PUBLIC_UPPY_COMPANION_URL: ${NEXT_PUBLIC_UPPY_COMPANION_URL}
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL}
ports:
- "3000:3000"
volumes:
# - /app/node_modules
# - /app/.next
# - /app/.pnpm-store
- ./packages/next/app:/app/app
bot:
container_name: fp-bot
build:
context: .
dockerfile: ./packages/bot/Dockerfile
target: dev
restart: on-failure
environment:
REST_HOST: localhost
REST_PORT: 8888
DISCORD_TOKEN: ${DISCORD_TOKEN}
DISCORD_GUILD_ID: ${DISCORD_GUILD_ID}
ports:
- "8888:8888"
volumes:
- ./packages/bot/package.json:/app/package.json
- ./packages/bot/src:/app/src
db:
container_name: fp-db
image: postgres:16
restart: on-failure
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data
PGPORT: ${POSTGRES_PORT}
volumes:
- ./compose/db/pgdata:/var/lib/postgresql/data
ports:
- "15432:15432"
pgadmin:
container_name: fp-pgadmin
image: dpage/pgadmin4:8
restart: on-failure
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_DISABLE_POSTFIX: yessir
GUNICORN_ACCESS_LOGFILE: /tmp/pgadmin-gunicorn-access.log # this makes console output less noisy
ports:
- "5050:80"
uppy:
container_name: fp-uppy
build:
context: .
dockerfile: ./packages/uppy/Dockerfile
target: run
restart: on-failure
environment:
SESSION_SECRET: ${UPPY_SESSION_SECRET}
PORT: ${UPPY_PORT}
FILEPATH: ${UPPY_FILEPATH}
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL}
HOST: ${UPPY_HOST}
UPLOAD_URLS: ${UPPY_UPLOAD_URLS}
SECRET: ${UPPY_SECRET}
SERVER_BASE_URL: ${UPPY_SERVER_BASE_URL}
B2_ENDPOINT: ${UPPY_B2_ENDPOINT}
B2_BUCKET: ${UPPY_B2_BUCKET}
B2_SECRET: ${UPPY_B2_SECRET}
B2_KEY: ${UPPY_B2_KEY}
B2_REGION: ${UPPY_B2_REGION}
DRIVE_KEY: ${UPPY_DRIVE_KEY}
DRIVE_SECRET: ${UPPY_DRIVE_SECRET}
DROPBOX_KEY: ${UPPY_DROPBOX_KEY}
DROPBOX_SECRET: ${UPPY_DROPBOX_SECRET}
JWT_SECRET: ${STRAPI_JWT_SECRET} # we use strapi's JWT secret so we can verify that uploads are from account holders
STRAPI_API_KEY: ${UPPY_STRAPI_API_KEY}
STRAPI_URL: ${UPPY_STRAPI_URL}
ports:
- "3020:3020"
volumes:
- ./packages/uppy/index.js:/app/index.js