fix docker and force redirect to https

This commit is contained in:
schlagmichdoch 2023-01-17 10:23:19 +01:00
parent 2671aa128f
commit 6707021e04
3 changed files with 5 additions and 39 deletions

View file

@ -10,4 +10,4 @@ COPY . .
EXPOSE 3000 EXPOSE 3000
CMD ["node", "index.js"] RUN npm start:prod

View file

@ -1,4 +1,3 @@
#Todo: fix turn server
version: "3" version: "3"
services: services:
node: node:
@ -6,8 +5,8 @@ services:
user: "node" user: "node"
working_dir: /home/node/app working_dir: /home/node/app
volumes: volumes:
- ./server/:/home/node/app - ./:/home/node/app
command: ash -c "npm i && node index.js" command: ash -c "npm i && npm start"
restart: unless-stopped restart: unless-stopped
nginx: nginx:
build: build:
@ -15,7 +14,7 @@ services:
dockerfile: nginx-with-openssl.Dockerfile dockerfile: nginx-with-openssl.Dockerfile
image: "nginx-with-openssl" image: "nginx-with-openssl"
volumes: volumes:
- ./client:/usr/share/nginx/html - ./public:/usr/share/nginx/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./docker/certs:/etc/ssl/certs - ./docker/certs:/etc/ssl/certs
- ./docker/openssl:/mnt/openssl - ./docker/openssl:/mnt/openssl
@ -26,28 +25,3 @@ services:
entrypoint: /mnt/openssl/create.sh entrypoint: /mnt/openssl/create.sh
command: ["nginx", "-g", "daemon off;"] command: ["nginx", "-g", "daemon off;"]
restart: unless-stopped 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"

View file

@ -4,15 +4,7 @@ server {
expires epoch; expires epoch;
location / { location / {
root /usr/share/nginx/html; return 301 https://$host:8443$request_uri;
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;
} }
location /ca.crt { location /ca.crt {