e1k
e1k
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
I finally found a way around, there is the setting --address it wasn't in the doc but I found it in the source code
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
Hello @Phorcys can you help me to setup my nginx ?
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
I m running into 502
nginx-marketplace | 2024/11/14 12:59:10 [error] 16#16: *9 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.18.0.1, server: marketplace.lab.fr, request: "GET /marketplace/ HTTP/1.1", upstream: "http://192.168.111.62:9015/", host: "127.0.0.1"
nginx-marketplace | 172.18.0.1 - - [14/Nov/2024:12:59:10 +0000] "GET /marketplace/ HTTP/1.1" 502 157 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"
nginx-marketplace | 2024/11/14 12:59:10 [error] 16#16: *9 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.18.0.1, server: marketplace.lab.fr, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1", referrer: "https://127.0.0.1/marketplace/"
nginx-marketplace | 172.18.0.1 - - [14/Nov/2024:12:59:10 +0000] "GET /favicon.ico HTTP/1.1" 404 153 "https://127.0.0.1/marketplace/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"
nginx-marketplace | 2024/11/14 12:59:10 [error] 16#16: *9 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.18.0.1, server: marketplace.lab.fr, request: "GET /marketplace/ HTTP/1.1", upstream: "http://192.168.111.62:9015/", host: "127.0.0.1"
nginx-marketplace | 172.18.0.1 - - [14/Nov/2024:12:59:10 +0000] "GET /marketplace/ HTTP/1.1" 502 157 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"
nginx-marketplace | 2024/11/14 12:59:10 [error] 16#16: *9 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.18.0.1, server: marketplace.lab.fr, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1", referrer: "https://127.0.0.1/marketplace/"
nginx-marketplace | 172.18.0.1 - - [14/Nov/2024:12:59:10 +0000] "GET /favicon.ico HTTP/1.1" 404 153 "https://127.0.0.1/marketplace/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
yeah, this is just for poc, it was easier, on prod it will be two different one
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
It was pretty similar, using port 3001:3001 and proxy_pass http://127.0.0.1:3001/
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
Yes, wait a few sec
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
I created a container containing nginx and code marketplace, nothing really fancy but I can share it if needed. This is my docker-compose :
services:
nginx_marketplace:
build:
context: .
dockerfile: Dockerfile
container_name: nginx-marketplace
ports:
- "80:80"
- "443:443"
- "9015:3001"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs/:/etc/nginx/certs/:ro
- ./exts:/exts
services:
nginx_marketplace:
build:
context: .
dockerfile: Dockerfile
container_name: nginx-marketplace
ports:
- "80:80"
- "443:443"
- "9015:3001"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs/:/etc/nginx/certs/:ro
- ./exts:/exts
And this my nginx config :
# /nginx.conf
events { }

http {
server {
listen 443 ssl;
server_name marketplace.lab.fr;

# Specify the paths to the mounted certificates
ssl_certificate /etc/nginx/certs/marketplace.crt;
ssl_certificate_key /etc/nginx/certs/marketplace.key;

location /marketplace/ {
proxy_pass http://192.168.111.62:9015/;

# Set headers required by the marketplace
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header Forwarded "host=$host;proto=$scheme";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

}

# Redirect HTTP to HTTPS
server {
listen 80;
server_name marketplace.lab.fr;

return 301 https://$host$request_uri;
}
}
# /nginx.conf
events { }

http {
server {
listen 443 ssl;
server_name marketplace.lab.fr;

# Specify the paths to the mounted certificates
ssl_certificate /etc/nginx/certs/marketplace.crt;
ssl_certificate_key /etc/nginx/certs/marketplace.key;

location /marketplace/ {
proxy_pass http://192.168.111.62:9015/;

# Set headers required by the marketplace
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header Forwarded "host=$host;proto=$scheme";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

}

# Redirect HTTP to HTTPS
server {
listen 80;
server_name marketplace.lab.fr;

return 301 https://$host$request_uri;
}
}
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
Sadly, this year I can't make it, I'm too busy. But I have great memories from the past years !
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
I manage to get a working nginx config, but I need to use an other port, I can't use 3001, there 's already a container that I can't move. I belive there's something to do with nginx but I'm not expert enough to find an answer.
25 replies
CCoder.com
Created by e1k on 11/13/2024 in #help
Code market place setup
Hello @Phorcys, i'm talking about this project : https://github.com/coder/code-marketplace Am I on the right discord ? I need to help for setup.
25 replies