102 lines
2.1 KiB
YAML
102 lines
2.1 KiB
YAML
name: captable
|
|
services:
|
|
app:
|
|
build:
|
|
target: deps
|
|
context: .
|
|
dockerfile: ./docker/Dockerfile
|
|
container_name: captable-app
|
|
depends_on:
|
|
- pg
|
|
- smtp
|
|
- minio
|
|
restart: always
|
|
ports:
|
|
- 3000:3000
|
|
env_file:
|
|
- ".env"
|
|
working_dir: /app
|
|
command: [/bin/sh, -c, "pnpm install && pnpm dev"]
|
|
volumes:
|
|
- .:/app
|
|
- /app/node_modules
|
|
- /app/.next
|
|
- /app/.pnpm-store
|
|
|
|
studio:
|
|
build:
|
|
target: deps
|
|
context: .
|
|
dockerfile: ./docker/Dockerfile
|
|
container_name: captable-studio
|
|
depends_on:
|
|
- pg
|
|
- smtp
|
|
- minio
|
|
restart: always
|
|
ports:
|
|
- 5555:5555
|
|
env_file:
|
|
- ".env"
|
|
working_dir: /app
|
|
command: [/bin/sh, -c, "pnpm install && pnpm db:studio"]
|
|
volumes:
|
|
- .:/app
|
|
- /app/node_modules
|
|
- /app/.next
|
|
- /app/.pnpm-store
|
|
|
|
pg:
|
|
image: postgres:15
|
|
container_name: captable-database
|
|
environment:
|
|
- POSTGRES_USER=captable
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=captable
|
|
- POSTGRES_EXTENSIONS=pgcrypto
|
|
ports:
|
|
- 54321:5432
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
|
|
smtp:
|
|
image: axllent/mailpit
|
|
container_name: captable-smtp
|
|
ports:
|
|
- 8025:8025
|
|
- 1025:1025
|
|
|
|
minio:
|
|
image: minio/minio
|
|
container_name: captable-minio
|
|
ports:
|
|
- 9002:9002
|
|
- 9001:9001
|
|
volumes:
|
|
- minio:/data
|
|
environment:
|
|
- MINIO_ROOT_USER=captable
|
|
- MINIO_ROOT_PASSWORD=password
|
|
entrypoint: sh
|
|
command: -c 'minio server /data --console-address ":9001" --address ":9002"'
|
|
|
|
# minio client - is expected to be run once to setup minio buckets. It'll exit 0 after setup
|
|
mc:
|
|
image: minio/mc
|
|
container_name: captable-minio-client
|
|
depends_on:
|
|
- minio
|
|
entrypoint: sh
|
|
command: |
|
|
-c "
|
|
sleep 10;
|
|
mc alias set myminio http://minio:9002 captable password;
|
|
mc mb myminio/captable-private-bucket;
|
|
mc mb myminio/captable-public-bucket;
|
|
mc policy set public myminio/captable-public-bucket;
|
|
exit 0;
|
|
"
|
|
volumes:
|
|
minio:
|
|
postgres:
|