Skip to content

Commit

Permalink
Merge pull request #112 from tableflowhq/feature/composebackend
Browse files Browse the repository at this point in the history
fixed compose file issue for backend
  • Loading branch information
ciminelli authored Oct 6, 2023
2 parents 48f909c + a9c8851 commit f0384d4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ sudo yum update -y && \
sudo yum install -y docker git && \
sudo service docker start && \
sudo usermod -a -G docker $USER && \
sudo curl -L "https://github.com/docker/compose/releases/download/v2.19.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
sudo wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/v2.19.1/docker-compose-$(uname -s)-$(uname -m) && \
sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose && \
sudo chmod +x /usr/bin/docker-compose && \
git clone https://github.com/tableflowhq/tableflow.git && cd tableflow && \
cp .env.example .env && \
mkdir tableflow && cd tableflow && \
wget https://raw.githubusercontent.com/tableflowhq/tableflow/main/{.env.example,docker-compose.yml,docker-compose.base.yml} && \
mv .env.example .env && \
sg docker -c 'docker-compose up -d'
```

Expand Down
9 changes: 6 additions & 3 deletions docker-compose-image.yml → docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ services:
service: scylla

backend:
image: tableflow/admin-server
build: "./admin-server"
extends:
file: docker-compose.base.yml
service: backend
depends_on:
postgres:
condition: service_healthy
Expand All @@ -23,7 +26,7 @@ services:
depends_on:
backend:
condition: service_healthy
image: tableflow/admin-ui
build: "./admin-ui"
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
Expand All @@ -37,7 +40,7 @@ services:
depends_on:
backend:
condition: service_healthy
image: tableflow/importer-ui
build: "./importer-ui"
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
Expand Down
13 changes: 6 additions & 7 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres:
image: 'postgres:latest'
image: "postgres:15.4"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
Expand All @@ -14,13 +14,13 @@ services:
restart: unless-stopped
command: -p ${POSTGRES_PORT}
healthcheck:
test: ['CMD', 'pg_isready', '-p', '${POSTGRES_PORT}']
test: ["CMD", "pg_isready", "-p", "${POSTGRES_PORT}"]
interval: 5s
timeout: 5s
retries: 5
retries: 10

scylla:
image: scylladb/scylla:latest
image: scylladb/scylla:5.2
container_name: scylla
ports:
- "9042:9042"
Expand All @@ -30,12 +30,11 @@ services:
command: --authorizer=AllowAllAuthorizer
healthcheck:
test: ["CMD", "cqlsh", "-e", "DESCRIBE KEYSPACES;"]
interval: 10s
interval: 5s
timeout: 5s
retries: 10
retries: 30

backend:
build: "./admin-server"
platform: linux/amd64
ports:
- "3003:3003"
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.dev-frontend.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3"
version: "4"

services:
postgres:
Expand All @@ -12,6 +12,7 @@ services:
service: scylla

backend:
build: "./admin-server"
extends:
file: docker-compose.base.yml
service: backend
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
service: scylla

backend:
image: registry-1.docker.io/tableflow/admin-server
extends:
file: docker-compose.base.yml
service: backend
Expand All @@ -25,7 +26,7 @@ services:
depends_on:
backend:
condition: service_healthy
build: "./admin-ui"
image: registry-1.docker.io/tableflow/admin-ui
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
Expand All @@ -39,7 +40,7 @@ services:
depends_on:
backend:
condition: service_healthy
build: "./importer-ui"
image: registry-1.docker.io/tableflow/importer-ui
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
Expand Down

0 comments on commit f0384d4

Please sign in to comment.