Single part at the root, COMPOSE_FILE in .env
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
{% if serve != 'api' %} frontend:
|
||||
build: {{ part_dir }}
|
||||
image: {{ project_slug }}/frontend
|
||||
profiles: [frontend, services]
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
{% if layout == 'part' %} - path: frontend/.env
|
||||
required: false
|
||||
{% endif %} command: {% if serve == 'bun' %}[build/index.js]{% else %}[run, serve.ts]{% endif %}
|
||||
|
||||
{% endif %} frontend-dev:
|
||||
image: oven/bun:alpine
|
||||
profiles: [frontend-dev]
|
||||
restart: unless-stopped
|
||||
working_dir: /app
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
{% if layout == 'part' %} - path: frontend/.env
|
||||
required: false
|
||||
{% endif %} environment:
|
||||
API_PROXY_TARGET: http://api:8080
|
||||
volumes:
|
||||
- {{ './frontend' if layout == 'part' else '.' }}:/app
|
||||
- frontend_node_modules:/app/node_modules
|
||||
- frontend_svelte_kit:/app/.svelte-kit
|
||||
command: [sh, -c, "bun install && bun run dev --host 0.0.0.0 --port 3000"]
|
||||
|
||||
volumes:
|
||||
frontend_node_modules:
|
||||
frontend_svelte_kit:
|
||||
Reference in New Issue
Block a user