Skip to content

Commit bc73a14

Browse files
committed
[bfops/ci-caching]: use custom docker-compose file
1 parent d9208b4 commit bc73a14

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

.github/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM rust:1.90.0
2+
RUN mkdir -p /stdb/data
3+
COPY ./target/debug/spacetimedb-standalone ./target/debug/spacetimedb-cli /usr/local/bin/
4+
COPY ./crates/standalone/config.toml /stdb/data/config.toml

.github/docker-compose.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
services:
2+
node:
3+
labels:
4+
app: spacetimedb
5+
build:
6+
context: ../
7+
dockerfile: ./Dockerfile
8+
args:
9+
CARGO_PROFILE: dev
10+
volumes:
11+
- ./crates/standalone:/usr/src/app/crates/standalone
12+
- ./crates/core:/usr/src/app/crates/core
13+
- ./crates/client-api:/usr/src/app/crates/client-api
14+
- ./crates/lib:/usr/src/app/crates/lib
15+
- ./crates/sats:/usr/src/app/crates/sats
16+
- ./crates/bindings:/usr/src/app/crates/bindings
17+
- ./crates/bindings-macro:/usr/src/app/crates/bindings-macro
18+
- ./crates/bindings-sys:/usr/src/app/crates/bindings-sys
19+
- ./crates/vm:/usr/src/app/crates/vm
20+
- ./crates/metrics:/usr/src/app/crates/metrics
21+
- ./crates/client-api-messages:/usr/src/app/crates/client-api-messages
22+
- ./Cargo.toml:/usr/src/app/Cargo.toml
23+
- ./flamegraphs:/usr/src/app/flamegraphs
24+
- key_files:/etc/spacetimedb
25+
- /stdb
26+
ports:
27+
- "3000:3000"
28+
# Postgres
29+
- "5432:5432"
30+
entrypoint: spacetimedb-standalone start --data-dir=/stdb/data --jwt-pub-key-path=/etc/spacetimedb/id_ecdsa.pub --jwt-priv-key-path=/etc/spacetimedb/id_ecdsa --pg-port 5432
31+
privileged: true
32+
environment:
33+
RUST_BACKTRACE: 1
34+
ENV: dev
35+
networks:
36+
- spacetimedb_default
37+
38+
networks:
39+
spacetimedb_default:
40+
name: spacetimedb_default
41+
volumes:
42+
key_files:

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
run: cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update
7979
- name: Build and start database (Linux)
8080
if: runner.os == 'Linux'
81-
run: docker compose up -d
81+
run: docker compose up -f .github/docker-compose.yml -d
8282
- name: Build and start database (Windows)
8383
if: runner.os == 'Windows'
8484
run: |

0 commit comments

Comments
 (0)