Reduced some image 301 round trips

This commit is contained in:
2022-04-05 18:13:40 +09:00
parent ec55e174db
commit 16f112485a
23 changed files with 92 additions and 48 deletions

View File

@@ -2,11 +2,13 @@ FROM astrojs/jre-nanoserver-20h2:latest
RUN pip3 install Flask redis compressinja celery
RUN New-Item -ItemType "Directory" -Path /opt/utils; \
New-Item -ItemType "Directory" -Path /app; \
RUN New-Item -ItemType Directory -Path /opt/utils; \
New-Item -ItemType Directory -Path /app/cache -Force; \
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -UseBasicParsing -Uri 'https://github.com/tgckpg/BotanJS/releases/download/compressors/closure.jar' -OutFile '/opt/utils/closure.jar' ; \
Invoke-WebRequest -UseBasicParsing -Uri 'https://github.com/tgckpg/BotanJS/releases/download/compressors/yuicompressor.jar' -OutFile '/opt/utils/yuicompressor.jar' ;
EXPOSE 5000
COPY . /app
WORKDIR /app
EXPOSE 5000

9
windows/base-compose.yml Normal file
View File

@@ -0,0 +1,9 @@
version: '3.9'
services:
python:
build: pyrt
image: astrojs/pyrt-nanoserver-20h2
jre:
build: jre
image: astrojs/jre-nanoserver-20h2

View File

@@ -1,12 +1,6 @@
version: '3.9'
services:
python:
build: pyrt
image: astrojs/pyrt-nanoserver-20h2
jre:
build: jre
image: astrojs/jre-nanoserver-20h2
redis:
container_name: astrojsdev_redis
build: redis
@@ -17,23 +11,25 @@ services:
build:
context: ../
dockerfile: windows/app/Dockerfile
environment:
REDIS_CONN: redis://:@redis:6379/9
command: [ "python", "main.py" ] # [ "ping", "127.0.0.1", "-n", "9999" ]
depends_on:
- redis
ports:
- 5000:5000
volumes:
- ../:C:/app
- cache:C:/app/cache
tasks:
container_name: astrojsdev_compiler
image: astrojs/app
environment:
REDIS_CONN: redis://:@redis:6379/9
command: [ "celery", "-A", "botanjs.service.jwork", "worker", "-l", "info", "--pool=solo" ]
depends_on:
- redis
- web
volumes:
- ../:C:/app
- cache:C:/app/cache
volumes:
cache:
temp: