databag/docker-compose.dev.yml
Lucian I. Last 2b3052ac3f
Better dev docker containers, Simpler production docker file, caddy for ssl (#136)
* Better dev docker containers, Simpler production docker file, caddy for ssl

* Fix repeater docker image

* Add depends on

* Use recommended caddy volumes & change to using databag image

* move to using examples folder for installation

* lint

* Tested example linux on bare metal

* Add DATABAG_PORT env and fix caddy

* Add dev_database for local sqlite testing

* incorrect use -z

* Add platform goarch goos optional envs

* Add more caching for faster rebuilds
2025-02-05 12:04:29 -08:00

47 lines
1.1 KiB
YAML

name: databag-dev
services:
net-web:
build:
context: ./net/web
dockerfile: Dockerfile.dev
working_dir: /app
volumes:
- ./net/web:/app
- cache_yarn:/root/.yarn
environment:
- YARN_CACHE_FOLDER=/root/.yarn
command: sh -c "yarn && chokidar '**/*.js' '**/*.ts' -c 'yarn run build' --debounce 18000 --initial --ignore node_modules --ignore build"
net-server:
build:
context: ./net/server
dockerfile: Dockerfile.dev
ports:
- 127.0.0.1:7000:7000
volumes:
- ./net/server:/app/databag/net/server
- ./dev_database:/var/lib/databag
- ./net/transform:/opt/databag/transform
- ./net/web/build:/app/databag/net/web/build
- cache_go:/go/pkg/mod
working_dir: /app
environment:
- ADMIN=password
- DEV=1
command: /app/databag/net/server/entrypoint.sh
net-repeater:
build:
context: ./net/repeater
dockerfile: Dockerfile.dev
working_dir: /app
volumes:
- ./net/repeater:/app
- cache_go:/go/pkg/mod
ports:
- 127.0.0.1:7878:7878
command: go run main.go
volumes:
cache_go:
cache_yarn: