Skip to content

Commit f7c341a

Browse files
committed
fix: update Docker configuration for production and adjust server port handling
1 parent 73f596d commit f7c341a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ services:
88
build: ./server
99
ports:
1010
- "3000:3000" # development
11-
- "443:443" # production HTTPS
11+
- "443:3000" # production HTTPS
1212
extra_hosts:
1313
- "host.docker.internal:host-gateway"
1414
volumes:
1515
- /etc/letsencrypt:/etc/letsencrypt:ro
16-
environment:
17-
- NODE_ENV=${NODE_ENV}
16+
env_file:
17+
- ./server/.env

server/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ if (process.env.NODE_ENV === 'production') {
5151
https.createServer({
5252
key: fs.readFileSync(process.env.SSL_KEY_PATH),
5353
cert: fs.readFileSync(process.env.SSL_CERT_PATH)
54-
}).listen(443, () => {
55-
console.log(`API is running on: http://localhost:443`)
54+
}).listen(process.env.HTTPS_PORT, () => {
55+
console.log(`API is running on: http://localhost:${process.env.HTTPS_PORT}`);
5656
});
5757
} else {
5858
app.listen(PORT, () => {

0 commit comments

Comments
 (0)