diff --git a/Dockerfile b/Dockerfile index 7e4a808..4a762f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ COPY . . EXPOSE 3000 -CMD ["node", "index.js"] +RUN npm start:prod diff --git a/docker-compose.yml b/docker-compose.yml index 4686fee..532c605 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -#Todo: fix turn server version: "3" services: node: @@ -6,8 +5,8 @@ services: user: "node" working_dir: /home/node/app volumes: - - ./server/:/home/node/app - command: ash -c "npm i && node index.js" + - ./:/home/node/app + command: ash -c "npm i && npm start" restart: unless-stopped nginx: build: @@ -15,7 +14,7 @@ services: dockerfile: nginx-with-openssl.Dockerfile image: "nginx-with-openssl" volumes: - - ./client:/usr/share/nginx/html + - ./public:/usr/share/nginx/html - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf - ./docker/certs:/etc/ssl/certs - ./docker/openssl:/mnt/openssl @@ -26,28 +25,3 @@ services: entrypoint: /mnt/openssl/create.sh command: ["nginx", "-g", "daemon off;"] restart: unless-stopped - coturn: - image: coturn/coturn:alpine - container_name: coturn_server - network_mode: host - restart: unless-stopped - command: - - "--log-file=stdout" - - "--external-ip=$$(detect-external-ip)" - # - "--no-auth" - - "--no-tcp" - - "--no-tls" - - "--no-dtls" - - "--no-cli" - # - "--stun-only" - - "--listening-ip=0.0.0.0" - - "--listening-port=3478" - - "--tls-listening-port=5349" - - "--min-port=49152" - - "--max-port=65535" - - "--fingerprint" - - "--realm=127.0.0.1" - - "-a" - - "--user=snapdrop:ifupvrwelijmoyjxmefcsvfxxmcphvxo" - - "--lt-cred-mech" -# - "--static-auth-secret=ifupvrwelijmoyjxmefcsvfxxmcphvxo" diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index c5aef38..c0eedde 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -4,15 +4,7 @@ server { expires epoch; location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /server { - proxy_connect_timeout 300; - proxy_pass http://node:3000; - proxy_set_header Connection "upgrade"; - proxy_set_header Upgrade $http_upgrade; + return 301 https://$host:8443$request_uri; } location /ca.crt {