diff --git a/.env.example b/.env.example index a87c1a48b..83443465f 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,6 @@ ## DOCKER_HOST_ADDRESS= GRPC_ALLOW_INSECURE=true -REDIS_HOST=redis LOGS_LEVEL=info LOGS_DRIVER_HOST=fluent LOGS_AGGREGRATOR_HOST=elasticsearch @@ -36,7 +35,6 @@ APISERVER_ROUTR_DEFAULT_PEER_SECRET=changeme APISERVER_ASTERISK_ARI_INTERNAL_URL=http://asterisk:8088 APISERVER_ASTERISK_ARI_USERNAME=ari APISERVER_ASTERISK_ARI_SECRET=changeme -APISERVER_ASTERISK_RECORDINGS_PATH=/etc/fonoster/recordings APISERVER_VAULT_ADDR=http://vault:8200 APISERVER_VAULT_TOKEN=changeme APISERVER_VAULT_UNSEAL_KEY=changeme diff --git a/asterisk/Dockerfile b/asterisk/Dockerfile index 0af0b741d..0759f85a0 100644 --- a/asterisk/Dockerfile +++ b/asterisk/Dockerfile @@ -1,15 +1,14 @@ -FROM alpine:3.19 +FROM alpine:3.18 LABEL maintainer="Pedro Sanders " COPY asterisk/config /etc/asterisk/ COPY asterisk/run.sh / RUN apk add --no-cache --update tini asterisk asterisk-speex asterisk-curl nodejs npm git \ - && npm install -g @fonoster/dispatcher@0.4.18 \ + && npm install -g @fonoster/dispatcher \ && chmod +x /run.sh \ && apk del --purge npm git - ENTRYPOINT ["tini", "-v", "--"] CMD ["/run.sh"] diff --git a/compose.dev.yaml b/compose.dev.yaml index ff4337613..7532ee4e4 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -28,7 +28,7 @@ services: redis: ports: - - 6379:6379 + - 127.0.0.1:6379:6379 vault: ports: diff --git a/compose.yaml b/compose.yaml index d69003c77..8c92c7d63 100644 --- a/compose.yaml +++ b/compose.yaml @@ -45,7 +45,6 @@ services: APISERVER_ASTERISK_ARI_INTERNAL_URL: ${APISERVER_ASTERISK_ARI_INTERNAL_URL} APISERVER_ASTERISK_ARI_USERNAME: ${APISERVER_ASTERISK_ARI_USERNAME} APISERVER_ASTERISK_ARI_SECRET: ${APISERVER_ASTERISK_ARI_SECRET} - APISERVER_ASTERISK_RECORDINGS_PATH: ${APISERVER_ASTERISK_RECORDINGS_PATH} APISERVER_VAULT_ADDR: ${APISERVER_VAULT_ADDR} APISERVER_VAULT_TOKEN: ${APISERVER_VAULT_TOKEN} APISERVER_S3_SERVER_HOST: ${APISERVER_S3_SERVER_HOST} @@ -65,6 +64,8 @@ services: ports: - 50052:50052 - 4000:4000 + expose: + - 6445 volumes: - ./etc/monitor.patch.js:/service/node_modules/@fonoster/monitor/dist/service/monitor.js:ro - ./etc/config:/home/fonoster/.fonoster/config:ro @@ -133,6 +134,7 @@ services: restart: unless-stopped environment: APISERVER_RBAC_CONFIG: "/root/.fonoster/rbac.json" + APISEERVER_ENDPOINT: ${APISERVER_ENDPOINT} ARI_PROXY_URL: ${ASTERISK_ARI_PROXY_URL} ARI_USERNAME: ${ASTERISK_ARI_USERNAME} ARI_SECRET: ${ASTERISK_ARI_SECRET} @@ -145,6 +147,7 @@ services: LOGS_LEVEL: ${LOGS_LEVEL} LOGS_DRIVER_HOST: ${LOGS_DRIVER_HOST} LOGS_TRANSPORT: ${LOGS_TRANSPORT} + GRPC_ALLOW_INSECURE: true expose: - 6060 - 8088 @@ -186,7 +189,7 @@ services: - ./etc/fluent.conf:/fluentd/etc/fluent.conf:ro elasticsearch: - image: elasticsearch:7.17.18 + image: elasticsearch:7.16.3 restart: unless-stopped platform: linux/x86_64 environment: diff --git a/mods/apiserver/etc/service_envs.json b/mods/apiserver/etc/service_envs.json index a51480465..3f6d1e5b9 100644 --- a/mods/apiserver/etc/service_envs.json +++ b/mods/apiserver/etc/service_envs.json @@ -5,7 +5,6 @@ "APISERVER_ASTERISK_ARI_INTERNAL_URL", "APISERVER_ASTERISK_ARI_USERNAME", "APISERVER_ASTERISK_ARI_SECRET", - "APISERVER_ASTERISK_RECORDINGS_PATH", "APISERVER_AUTOPILOT_URL", "APISERVER_ENDPOINT", "APISERVER_ROUTR_API_HOST", diff --git a/mods/dispatcher/src/utils/upload_recording.ts b/mods/dispatcher/src/utils/upload_recording.ts index a2b119420..0ab0ab9ab 100644 --- a/mods/dispatcher/src/utils/upload_recording.ts +++ b/mods/dispatcher/src/utils/upload_recording.ts @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { APISERVER_RECORDINGS_PATH } from "../envs"; +import { RECORDINGS_PATH } from "../envs"; import { getLogger } from "@fonoster/logger"; import Auth from "@fonoster/auth"; import Storage from "@fonoster/storage"; @@ -42,6 +42,6 @@ export const uploadRecording = async ( await storage.uploadObject({ // TODO: Place bucket name on a constant bucket: "recordings", - filename: `${APISERVER_RECORDINGS_PATH}/${filename}` + filename: `${RECORDINGS_PATH}/${filename}` }); };