Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local source code debugging problem #61

Closed
812406210 opened this issue Nov 19, 2022 · 2 comments
Closed

Local source code debugging problem #61

812406210 opened this issue Nov 19, 2022 · 2 comments
Assignees

Comments

@812406210
Copy link

hello,i look this project source code ,so i'm running this code for idea 。
1、 the backend and froend is running ,meanwhile i start nginx and copy deploy/nginx/conf.d/default.conf content to nginx.conf 。but it not running , can u help me?
Uploading image.png…

image
2、INSERT INTO x1_community.user(username, password, nickname) VALUES ('admin@xtreme1.io', '$2a$10$0qk8vIkREsV6KYPeYJLU..C/JxJZc/ccfZIcEmFcnS8W9DtOD/y5K', 'admin'); what is password plaintext ?
3、my nginx.conf content
location / {
set $no_cache 0;
if ($uri ~* ^/$) {
set $no_cache 1;
}
if ($uri ~* .(?:html|json)$) {
set $no_cache 1;
}
if ($no_cache = 1) {
add_header Cache-Control "no-store,no-cache";
add_header Pragma "no-cache";
}

		proxy_pass   http://localhost:8080/main/;
	}

	location /tool/image {
		set $no_cache 0;
		if ($uri ~* ^/tool/image[/]?$) {
			set $no_cache 1;
		}
		if ($uri ~* \.(?:html|json)$) {
			set $no_cache 1;
		}
		if ($no_cache = 1) {
			add_header Cache-Control "no-store,no-cache";
			add_header Pragma "no-cache";
		}

		proxy_pass   http://localhost:8080/image-tool/;
	}

	location /tool/pc {
		set $no_cache 0;
		if ($uri ~* ^/tool/pc[/]?$) {
			set $no_cache 1;
		}
		if ($uri ~* \.(?:html|json)$) {
			set $no_cache 1;
		}
		if ($no_cache = 1) {
			add_header Cache-Control "no-store,no-cache";
			add_header Pragma "no-cache";
		}

		proxy_pass   http://localhost:8080/pc-tool/;
	}

	location /api/ {
		proxy_set_header Host $http_host;
		proxy_set_header X-Forwarded-Proto $scheme;
		rewrite ^/api/(.*) /$1 break;
		proxy_pass   http://localhost:8080;
	}

	location /minio/ {
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;

		proxy_http_version 1.1;
		proxy_set_header Connection "";
		chunked_transfer_encoding off;

		rewrite ^/minio/(.*) /$1 break;
		proxy_pass http://localhost:9000;
	}
}
@jaggerwang
Copy link
Contributor

  1. Which component do you want to run from source code? We suggest only running one component from source code at once, and use docker compose to run all other dependent components, it will simple the developing process. For example, you can run backend component from source code, and using mysql, redis and minio running in docker compose, notice that you should connect these components using host binding ports. When you finish changing code, you can build an component image to replace the official one in docker compose.
  2. To create the default dataset, we need an default user, and this is the admin user, the password is root@123, but you can always register your own user.
  3. When you run nginx out of docker compose, you should change each upstream's address to the local one. For mysql, redis and minio running in docker compose, you should use the host binding ports. For frontend and backend running from source code, you should use the localhost listening port, for backend it will be http://localhost:8280/ if you following the backend README doc.

@812406210
Copy link
Author

thanks ,i have resolved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants