diff --git a/Dockerfile b/Dockerfile index 095ce34..7cdad73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /usr/app COPY yarn.lock . COPY package.json . -RUN apk update && apk add --no-cache g++ make python3 git openssh && rm -rf /var/cache/apk/* +RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/* RUN yarn install --network-concurrency 2 COPY . ./ @@ -17,7 +17,7 @@ ENV NODE_ENV=production WORKDIR /app -RUN apk update && apk add --no-cache g++ make python3 git openssh && rm -rf /var/cache/apk/* +RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/* COPY --from=dev /usr/app/build /app COPY --from=dev /usr/app/package.json /app/ diff --git a/docker-compose.yml b/docker-compose.yml index 9059b5e..9474509 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' services: server: @@ -9,6 +9,7 @@ services: environment: REDIS_URL: redis://redis/0 nginx_proxy_read_timeout: 600 + VIRTUAL_PORT: ${APP_PORT} depends_on: [redis] worker1: @@ -68,11 +69,12 @@ services: redis: image: redis restart: always - command: [redis-server, '/usr/local/etc/redis/redis.conf', --appendonly, 'yes'] + environment: + - REDIS_APPENDONLY=yes + - REDIS_APPENDFSYNC=always ports: - - '6379:6379' + - '127.0.0.1:6379:6379' # do not expose redis port volumes: - - ./redis.conf:/usr/local/etc/redis/redis.conf - redis:/data nginx: @@ -95,9 +97,11 @@ services: container_name: dockergen restart: always command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf - volumes_from: - - nginx volumes: + - conf:/etc/nginx/conf.d + - vhost:/etc/nginx/vhost.d + - html:/usr/share/nginx/html + - certs:/etc/nginx/certs - /var/run/docker.sock:/var/run/docker.sock:ro letsencrypt: @@ -106,9 +110,11 @@ services: restart: always environment: NGINX_DOCKER_GEN_CONTAINER: dockergen - volumes_from: - - nginx - - dockergen + volumes: + - conf:/etc/nginx/conf.d + - vhost:/etc/nginx/vhost.d + - html:/usr/share/nginx/html + - certs:/etc/nginx/certs volumes: conf: diff --git a/src/services/config.service.ts b/src/services/config.service.ts index 35920e7..a68b9a8 100644 --- a/src/services/config.service.ts +++ b/src/services/config.service.ts @@ -14,12 +14,7 @@ import { tornToken, } from '../config'; import { ChainIds, Token } from '../types'; -import { - getProvider, - getTornadoProxyContract, - getTornadoProxyLightContract, - getTornTokenContract -} from '../modules/contracts'; +import { getProvider, getTornadoProxyContract, getTornadoProxyLightContract, getTornTokenContract } from '../modules/contracts'; import { resolve } from '../modules'; import { ERC20Abi, ProxyLightABI, TornadoProxyABI } from '../contracts'; import { availableIds, netIds, NetInstances } from 'torn-token';