🐳 Added files
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM node:17.3-alpine
|
||||
LABEL maintainer="Rishi Ghan <rishi.ghan@gmail.com>"
|
||||
|
||||
RUN mkdir -p /usr/src/threetwo
|
||||
WORKDIR /usr/src/threetwo
|
||||
|
||||
COPY package.json /usr/src/threetwo
|
||||
COPY yarn.lock /usr/src/threetwo
|
||||
COPY nodemon.json /usr/src/threetwo
|
||||
COPY jsdoc.json /usr/src/threetwo
|
||||
|
||||
# RUN apt-get update && apt-get install -y git python3 build-essential autoconf automake g++ libpng-dev make
|
||||
RUN apk --no-cache add g++ make libpng-dev python3 git libc6-compat autoconf automake bash libjpeg-turbo-dev libpng-dev mesa-dev mesa libxi build-base gcc libtool nasm
|
||||
RUN yarn --ignore-engines
|
||||
|
||||
|
||||
COPY . /usr/src/threetwo
|
||||
EXPOSE 3050
|
||||
|
||||
ENTRYPOINT [ "npm", "start" ]
|
||||
12
docker-compose.env
Normal file
12
docker-compose.env
Normal file
@@ -0,0 +1,12 @@
|
||||
UNDERLYING_HOSTNAME=ghost
|
||||
COMICS_DIRECTORY=/Users/rishi/work/threetwo/comics
|
||||
USERDATA_DIRECTORY=/Users/rishi/work/threetwo/userdata
|
||||
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=dist/services
|
||||
|
||||
MONGO_URI=mongodb://db:27017/threetwo
|
||||
REDIS_URI=redis://redis:6379
|
||||
TRANSPORTER=redis://redis:6379
|
||||
CACHER=Memory
|
||||
152
docker-compose.yml
Normal file
152
docker-compose.yml
Normal file
@@ -0,0 +1,152 @@
|
||||
version: "3.7"
|
||||
|
||||
x-userdata-volume:
|
||||
&userdata-volume
|
||||
type: bind
|
||||
source: ${USERDATA_DIRECTORY}
|
||||
target: /userdata
|
||||
|
||||
x-comics-volume:
|
||||
&comics-volume
|
||||
type: bind
|
||||
source: ${COMICS_DIRECTORY}
|
||||
target: /comics
|
||||
services:
|
||||
threetwo:
|
||||
build:
|
||||
context: .
|
||||
image: frishi/threetwo
|
||||
container_name: threetwo-ui
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- "8050:8050"
|
||||
- "3050:3050"
|
||||
links:
|
||||
- importapi
|
||||
depends_on:
|
||||
- db
|
||||
- elasticsearch
|
||||
- redis
|
||||
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
comicvineapi:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-metadata-service.git
|
||||
image: frishi/threetwo-metadata-service
|
||||
container_name: comicvine-api
|
||||
ports:
|
||||
- "3080:3080"
|
||||
volumes:
|
||||
- *comics-volume
|
||||
- *userdata-volume
|
||||
environment:
|
||||
SERVICES: api
|
||||
env_file: docker-compose.env
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
comicvine:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-metadata-service.git
|
||||
image: frishi/threetwo-metadata-service
|
||||
container_name: comicvine-service
|
||||
environment:
|
||||
SERVICES: comicvine
|
||||
env_file: docker-compose.env
|
||||
volumes:
|
||||
- *comics-volume
|
||||
- *userdata-volume
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
importapi:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-core-service.git
|
||||
image: frishi/threetwo-core-service
|
||||
container_name: importapi
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
environment:
|
||||
SERVICES: api
|
||||
env_file: docker-compose.env
|
||||
volumes:
|
||||
- *comics-volume
|
||||
- *userdata-volume
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
core-services:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-core-service.git
|
||||
image: frishi/threetwo-core-service
|
||||
container_name: core-services
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- elasticsearch
|
||||
environment:
|
||||
name: core-services
|
||||
SERVICES: library,queue,settings,search,imagetransformation
|
||||
env_file: docker-compose.env
|
||||
volumes:
|
||||
- *comics-volume
|
||||
- *userdata-volume
|
||||
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
db:
|
||||
image: "bitnami/mongodb:latest"
|
||||
container_name: database
|
||||
networks:
|
||||
- proxy
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- "mongodb_data:/bitnami/mongodb"
|
||||
|
||||
redis:
|
||||
image: "bitnami/redis:latest"
|
||||
container_name: queue
|
||||
environment:
|
||||
ALLOW_EMPTY_PASSWORD: "yes"
|
||||
networks:
|
||||
- proxy
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
|
||||
container_name: elasticsearch
|
||||
environment:
|
||||
- "discovery.type=single-node"
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- "xpack.security.enabled=true"
|
||||
- "xpack.security.authc.api_key.enabled=true"
|
||||
- "ELASTIC_PASSWORD=password"
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
ports:
|
||||
- 9200:9200
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
driver: local
|
||||
elasticsearch:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user