mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Adds dev tools docker image
This commit is contained in:
parent
1a2c85a327
commit
b601ac6f91
6 changed files with 26 additions and 6 deletions
10
bw-dev
10
bw-dev
|
@ -35,7 +35,7 @@ function initdb {
|
|||
}
|
||||
|
||||
function makeitblack {
|
||||
runweb black celerywyrm bookwyrm
|
||||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||
}
|
||||
|
||||
function awscommand {
|
||||
|
@ -135,15 +135,15 @@ case "$CMD" in
|
|||
makeitblack
|
||||
;;
|
||||
prettier)
|
||||
npx prettier --write bookwyrm/static/js/*.js
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
;;
|
||||
stylelint)
|
||||
npx stylelint bookwyrm/static/**/*.css --fix
|
||||
docker-compose run --rm dev-tools npx stylelint bookwyrm/static/**/*.css --fix
|
||||
;;
|
||||
formatters)
|
||||
makeitblack
|
||||
npx prettier --write bookwyrm/static/js/*.js
|
||||
npx stylelint bookwyrm/static/**/*.css --fix
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
docker-compose run --rm dev-tools npx stylelint bookwyrm/static/**/*.css --fix
|
||||
;;
|
||||
update)
|
||||
git pull
|
||||
|
|
15
dev-tools-docker/Dockerfile
Normal file
15
dev-tools-docker/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM python:3.9
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN mkdir /app /app/static /app/images
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json requirements.txt /app/
|
||||
RUN pip install black
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install .
|
1
dev-tools-docker/requirements.txt
Normal file
1
dev-tools-docker/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
black==21.4b2
|
|
@ -84,6 +84,11 @@ services:
|
|||
- db
|
||||
- redis_broker
|
||||
restart: on-failure
|
||||
dev-tools:
|
||||
build: dev-tools-docker
|
||||
env_file: .env
|
||||
volumes:
|
||||
- .:/app
|
||||
volumes:
|
||||
pgdata:
|
||||
static_volume:
|
||||
|
|
|
@ -25,7 +25,6 @@ opentelemetry-instrumentation-django==0.27b0
|
|||
opentelemetry-instrumentation-celery==0.27b0
|
||||
|
||||
# Dev
|
||||
black==21.4b2
|
||||
pytest-django==4.1.0
|
||||
pytest==6.1.2
|
||||
pytest-cov==2.10.1
|
||||
|
|
Loading…
Reference in a new issue