mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:50:42 +00:00
copy .env file to instance
This commit is contained in:
@@ -234,11 +234,9 @@ async function schedulePublicGame() {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Internal-Request": "true",
|
||||
[config.adminHeader()]: config.adminToken(),
|
||||
},
|
||||
body: JSON.stringify({
|
||||
gameID: gameID,
|
||||
gameConfig: defaultGameConfig,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -81,10 +81,10 @@ export function startWorker() {
|
||||
const gc = req.body?.gameConfig as GameConfig;
|
||||
if (
|
||||
gc?.gameType == GameType.Public &&
|
||||
req.headers[config.adminHeader()] != config.adminToken()
|
||||
req.headers[config.adminHeader()] !== config.adminToken()
|
||||
) {
|
||||
console.warn(
|
||||
`cannot create public game ${id}, ip ${clientIP} not localhost`,
|
||||
`cannot create public game ${id}, ip ${clientIP} incorrect admin token`,
|
||||
);
|
||||
return res.status(400);
|
||||
}
|
||||
|
||||
+1
-1
Submodule src/server/gatekeeper updated: 523c784e62...089ff9e297
@@ -84,6 +84,10 @@ chmod +x $UPDATE_SCRIPT
|
||||
|
||||
# Copy the update script to the EC2 instance
|
||||
scp -i $EC2_KEY $UPDATE_SCRIPT $EC2_HOST:$REMOTE_UPDATE_SCRIPT
|
||||
scp -i $EC2_KEY .env $EC2_HOST:/home/ec2-user/.env
|
||||
# After copying the .env file, secure it
|
||||
ssh -i $EC2_KEY $EC2_HOST "chmod 600 /home/ec2-user/.env"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "❌ Failed to copy update script to EC2 instance. Stopping deployment."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user