Skip to content

Commit

Permalink
Ports, Ports, Ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Gesugao-san committed Feb 13, 2024
1 parent 0cbf990 commit 998a3d0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
16 changes: 12 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,23 @@
"dockerRun": {
"image": "gesugaosan/proxima.fun",
"containerName": "proxima.fun",
"ports": [{
"ports": [{ // HTTP
"containerPort": 80, //The port number bound on the container. Required.
"hostPort": 8091, //The port number bound on the host.
"protocol": "tcp",
}/* ,{
"containerPort": 8091,
} ,{ // WebSocket (1)
"containerPort": 443,
"hostPort": 443,
"protocol": "tcp",
} */],
} ,{ // WebSocket (2)
"containerPort": 3000,
"hostPort": 3000,
"protocol": "tcp",
} ,{ // Vite5
"containerPort": 5173,
"hostPort": 5173,
"protocol": "tcp",
}],
"env": {
//"DEBUG": "*",
"NODE_ENV": "production"
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ EXPOSE 80:8091/tcp
### HTTP (2)
#EXPOSE 8080:8080/tcp

### WebSocket
#EXPOSE 443:443/tcp
### WebSocket (1)
EXPOSE 443:443/tcp
#EXPOSE 8091:443/tcp

#
### WebSocket (2)
#EXPOSE 3001:3000/tcp
#EXPOSE 3000:3000/tcp
EXPOSE 3000:3000/tcp

### Vite ver. 5 default
#EXPOSE 5173:5173/tcp
EXPOSE 5173:5173/tcp

### Vite (ver. <5) default
#EXPOSE 24678:24678/tcp
Expand Down
20 changes: 15 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ services:
published: 8091 # the publicly exposed port
protocol: tcp
mode: host
#- name: "WebSocket"
#target: 8091 # the port inside the container
#published: 443 # the publicly exposed port
#protocol: tcp
#mode: host
- name: "WebSocket (1)"
target: 443 # the port inside the container
published: 443 # the publicly exposed port
protocol: tcp
mode: host
- name: "WebSocket (2)"
target: 3000 # the port inside the container
published: 3000 # the publicly exposed port
protocol: tcp
mode: host
- name: "Vite5"
target: 5173 # the port inside the container
published: 5173 # the publicly exposed port
protocol: tcp
mode: host
#- 80:80
#- 8080:8080
#- 443:443
Expand Down
9 changes: 4 additions & 5 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ export default defineConfig({
//host: '0.0.0.0', // OK
//host: true, // OK
//host: 'localhost', // NOT FOR PUBLIC
//port: 8080, // CRITICAL
//port: 80, // CRITICAL
//clientPort: 80,
port: 80, // CRITICAL
clientPort: 80,
//https: false, // UNKNOWN
//strictPort: true, // OK
//// https://vitejs.dev/config/server-options.html#server-hmr
Expand All @@ -37,12 +36,12 @@ export default defineConfig({
protocol: 'ws', // OK
//protocol: 'wss', // LOOP
//port: 8080,
//port: 443, // OK
port: 443, // OK
//Port: 443, // OK
//port: 3000,
//clientPort: 8080,
//clientPort: 3001,
//clientPort: 443, // LOOP
clientPort: 443, // LOOP
},
}
})

0 comments on commit 998a3d0

Please sign in to comment.