dpaste/docker-compose.yml
Darren 0ce78d752e
feat: build css & js
CSS and JS file for docker-compose users.

Signed-off-by: Darren <git@darrennathanael.com>
2022-03-03 02:30:30 -05:00

52 lines
1 KiB
YAML

version: "3.4"
services:
staticfiles:
build:
context: .
target: staticfiles
args:
BUILD_EXTRAS: dev
image: staticfiles
volumes:
- ./package.json:/app/package.json
- ./package-log.json:/app/package-log.json
- ./client:/app/client:delegated
- ./dpaste/static:/app/dpaste/static
app:
stdin_open: true
tty: true
restart: always
build:
context: .
target: build
args:
BUILD_EXTRAS: dev
image: app
environment:
STATIC_ROOT: /collectstatic
DATABASE_URL: sqlite:////db/dpaste.sqlite
PORT: 8000
volumes:
- .:/app:delegated
- data_collectstatic:/collectstatic
- data_db:/db
ports:
- "8000:8000"
command: mkdir -p dpaste/static
command: make css
command: make js
command: ./manage.py runserver 0:8000
migration:
image: app
command: ./manage.py migrate --noinput
volumes:
- .:/app:delegated
- data_db:/db
volumes:
data_db:
data_collectstatic: