HOST_ADDR=0.0.0.0
PORT=3334
LOCAL_RUST_SET=false
SESS_SECRET=YOURSECRETKEYGOESHERE
REQ_TIMEOUT=130000
RUST_TIMEOUT=120000
TS_NODE_PROJECT=./tsconfig.prod.json
FRONT_HOST_ADDR="http://127.0.0.1:8080"
FRONT_MAIN_ADDR=/
FRONT_LOGIN_ADDR=/signUp
OAUTH_REDIRECT="http://127.0.0.1:8080"
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
REDISHOST=redis-sess
REDISPORT=6379
PGHOST=pgdb
PGPORT=5432
PGUSER=ljs
PGPASSWORD=secret
PGDATABASE=cosmonaut
Set REQ_TIMEOUT
Set RUST_TIMEOUT
Set GOOGLE_*
and GITHUB_*
Set OAUTH_REDIRECT
only when you use proxy server
Set FRONT_MAIN_ADDR
, FRONT_LOGIN_ADDR
Set FRONT_HOST_ADDR
Set PG*
for PostgreSQL connection and REDIS*
for Redis connection. You can customize those values as needed.
REACT_APP_API_ADDR=http://127.0.0.1:8080
Set BUILD_ENV
args in compose.yml
according to your situation ( production / development )
# Pull cosmo-rust image
docker pull tkxkd0159/cosmo-rust:latest
# Build react
# if you want rebuild react code, execute a script without 'new'
./react-build.sh [new]
# Build api-server
docker compose build
# Start app
docker compose up
docker compose down
docker volume rm cosmonaut_pgdb cosmonaut_cosmproj cosmonaut_cargo cosmonaut_cosmbase