Skip to content

Commit

Permalink
webcave: Move compose file to repo root
Browse files Browse the repository at this point in the history
Move compose file for webcave server to repo root since it is needed by the  infra role with which we will deploy it.
Updated the compose file to be compatible with environment variable forwarding from the ansible role. Namely, we need
PORT, IS_BEHIND_PROXY and CLIENT_ORIGIN_URL to be read from environment of the process starting the containers. Also,
in the case these values are not present or empty, just use the default ones.
Update Readme file to reflect changes.

Referenced issue: status-im/infra-misc#308

Signed-off-by: markoburcul <[email protected]>
  • Loading branch information
markoburcul committed Aug 13, 2024
1 parent e3a8e81 commit 75316f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

.env
.env

saved_world_data
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,13 @@ To run the project, you'll need:
### Running the game server ─=≡Σ((( つ◕ل͜◕)つ
To run the server, follow next steps:

**Step 1:** Navigate to the server package
```cd packages/webcave-server```
**Step 1:** Create the .env file and fill/change any missing data
```cp packages/webcave-server/.env.example .env```

**Step 2:** Create the .env file and fill/change any missing data
```cp .env.example .env```

**Step 3:** Run docker
**Step 2:** Run docker
```docker-compose up```

**Step 4:** Enjoy! ٩(^‿^)۶
**Step 3:** Enjoy! ٩(^‿^)۶

<br/>
<img align="left" alt="acid-info-logo" width="100" height="100" src="./github/assets/acid.png">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ services:
webcave_server:
container_name: "server"
build:
context: ./../../
context: ./
dockerfile: ./packages/webcave-server/Dockerfile
ports:
- ${PORT}:${PORT}
volumes:
- ./saved_world_data:/usr/src/app/packages/webcave-server/saved_world_data
- ./saved_world_data:/usr/src/app/packages/webcave-server/saved_world_data
environment:
- PORT=${PORT:-3001}
- CLIENT_ORIGIN_URL=${CLIENT_ORIGIN_URL:-http://localhost:3001}
- IS_BEHIND_PROXY=${IS_BEHIND_PROXY:-false}
env_file:
- .env
1 change: 0 additions & 1 deletion packages/webcave-server/.gitignore

This file was deleted.

0 comments on commit 75316f9

Please sign in to comment.