Skip to content

Instantly share code, notes, and snippets.

<AppSidebarNav items={navigation()} />
<CSidebarHeader className="border-top">
<CSidebarNav>
<CNavItem href="#" onClick={handleLogout}>
<CIcon customClassName="nav-icon" icon={cilAccountLogout}style={{marginLeft: unfoldable ? "0px" : "-20px", float: "left"}} />
Logout
</CNavItem>
</CSidebarNav>
</CSidebarHeader>
const AppSidebar = ({submitLogout}) => {
const dispatch = useDispatch()
const unfoldable = useSelector((state) => state.sidebarUnfoldable)
const sidebarShow = useSelector((state) => state.sidebarShow)
const [sidebarExpand, setSidebarExpand] = useState(true);
useEffect(() => {
console.log("sidebarExpand:" + sidebarExpand);
server {
listen 80;
server_name 182.20.4.110 mydomain.io;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/ubuntu/myproj_app/static/;
}
ubuntu@ip-182-20-4-110:~$ ls -ld /home/ubuntu/myproj_app/frontend/build/index.html
-rwxr-xr-x 1 www-data www-data 644 Apr 1 09:47 /home/ubuntu/myproj_app/frontend/build/index.html
ubuntu@ip-182-20-4-110:~$ ls -ld /home/ubuntu/myproj_app/frontend/build/index.html
-rwxr-xr-x 1 www-data www-data 644 Apr 1 09:47 /home/ubuntu/myproj_app/frontend/build/index.html
ubuntu@ip-182-20-4-110:~$ ls -ld /home/ubuntu/myproj_app/frontend/build/
drwxr-xr-x 3 www-data www-data 4096 Apr 1 09:47 /home/ubuntu/myproj_app/frontend/build/
ubuntu@ip-182-20-4-110:~$ sudo -u www-data ls /home/ubuntu/myproj_app/frontend/build/
ls: cannot access '/home/ubuntu/myproj_app/frontend/build/': Permission denied
ubuntu@ip-182-20-4-110:~$ sudo -u ubuntu ls /home/ubuntu/myproj_app/frontend/build/
asset-manifest.json favicon.ico index.html manifest.json robots.txt static
Creating frontend_container ... done
Creating redis ... done
Creating backend_container ... done
Creating django-react-docker_nginx_1 ... done
Attaching to frontend_container, backend_container, redis, django-react-docker_nginx_1
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1 | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
frontend_container |
$ sudo docker-compose up
Creating network "django-react-docker_default" with the default driver
Creating volume "django-react-docker_static" with default driver
Creating volume "django-react-docker_frontend" with default driver
Pulling redis (redis:alpine)...
alpine: Pulling from library/redis
4abcf2066143: Already exists
5c3180d10209: Pull complete
f76326fd8e6b: Pull complete
034c076ba1e7: Pull complete
App.js:79 WebSocket connection to 'ws://localhost:8000/ws/notifications/' failed: WebSocket is closed before the connection is established.
App.js:71 WebSocket error Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
App.js:75 WebSocket closed CloseEvent {isTrusted: true, wasClean: false, code: 1006, reason: '', type: 'close', …}
localhost/:1 Error while trying to use the following icon from the Manifest: http://localhost:3000/logo192.png (Download error or resource isn't a valid image)
App.js:62 Connected to notification websocket
App.js:79 WebSocket connection to 'ws://localhost:8000/ws/notifications/' failed: WebSocket is closed before the connection is established.
App.js:71 WebSocket error Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
App.js:75 WebSocket closed CloseEvent {isTrusted: true, wasClean: false, code: 1006, reason: '', type: 'close', …}
App.js:62 Connected to notification websocket
App.js:59 WebSocket connection to 'ws://localhost:8000/ws/notifications/' failed:
App.js:71 WebSocket error Event
App.js:75 WebSocket closed CloseEvent
const ws = new WebSocket('ws://localhost:8000/ws/notifications/');