Skip to content

Commit da5f291

Browse files
authored
Move docker-related files to docker directory (#1116)
1 parent 35a52b6 commit da5f291

17 files changed

+27
-28
lines changed

.github/workflows/build-and-dockerize.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
BUILD_STABLE: ${{ inputs.publishLatest && '1' || '' }}
125125
with:
126126
push: true
127-
files: docker.hcl
127+
files: docker/docker.hcl
128128
targets: ${{ inputs.targets }}
129129
set: |
130130
*.cache-from=type=gha

.github/workflows/tests-e2e.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ jobs:
4444
- name: patch compose file volumes
4545
uses: mikefarah/yq@v4.30.8
4646
with:
47-
cmd: yq -i 'del(.services.*.volumes)' docker-compose.community.yml
47+
cmd: yq -i 'del(.services.*.volumes)' docker/docker-compose.community.yml
4848

4949
- name: run containers
5050
timeout-minutes: 10
51-
run: docker compose -f docker-compose.community.yml up -d --wait
51+
run: docker compose -f docker/docker-compose.community.yml up -d --wait
5252

5353
- name: troubleshoot containers
5454
if: ${{ failure() }}
5555
run: |
56-
docker compose -f docker-compose.community.yml ps
57-
docker compose -f docker-compose.community.yml logs
56+
docker compose -f docker/docker-compose.community.yml ps
57+
docker compose -f docker/docker-compose.community.yml logs
5858
5959
- name: cypress
6060
timeout-minutes: 6

.github/workflows/tests-integration.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: patch compose file volumes
4545
uses: mikefarah/yq@v4.30.8
4646
with:
47-
cmd: yq -i 'del(.services.*.volumes)' docker-compose.community.yml
47+
cmd: yq -i 'del(.services.*.volumes)' docker/docker-compose.community.yml
4848

4949
- name: get cpu count for jest
5050
id: cpu-cores
@@ -53,13 +53,13 @@ jobs:
5353
- name: run containers
5454
timeout-minutes: 8
5555
run: |
56-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
56+
docker compose -f docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
5757
5858
- name: troubleshoot containers
5959
if: ${{ failure() }}
6060
run: |
61-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env ps
62-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env logs
61+
docker compose -f docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env ps
62+
docker compose -f docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env logs
6363
6464
- name: run integration tests
6565
timeout-minutes: 10
@@ -71,4 +71,4 @@ jobs:
7171
- name: log dump
7272
if: ${{ failure() }}
7373
run: |
74-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env logs
74+
docker compose -f docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env logs

.yarnrc

-1
This file was deleted.

deployment/utils/local-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let loadedConfig: any = null;
55

66
export function getLocalComposeConfig() {
77
if (!loadedConfig) {
8-
loadedConfig = yaml.load(readFileSync('../docker-compose.community.yml', 'utf8'));
8+
loadedConfig = yaml.load(readFileSync('../docker/docker-compose.community.yml', 'utf8'));
99
}
1010

1111
return {
File renamed without changes.
File renamed without changes.
File renamed without changes.

docker.hcl renamed to docker/docker.hcl

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,28 @@ function "image_tag" {
4949
}
5050

5151
target "migrations-base" {
52-
dockerfile = "${PWD}/migrations.dockerfile"
52+
dockerfile = "${PWD}/docker/migrations.dockerfile"
5353
args = {
5454
RELEASE = "${RELEASE}"
5555
}
5656
}
5757

5858
target "service-base" {
59-
dockerfile = "${PWD}/services.dockerfile"
59+
dockerfile = "${PWD}/docker/services.dockerfile"
6060
args = {
6161
RELEASE = "${RELEASE}"
6262
}
6363
}
6464

6565
target "app-base" {
66-
dockerfile = "${PWD}/app.dockerfile"
66+
dockerfile = "${PWD}/docker/app.dockerfile"
6767
args = {
6868
RELEASE = "${RELEASE}"
6969
}
7070
}
7171

7272
target "router-base" {
73-
dockerfile = "${PWD}/router.dockerfile"
73+
dockerfile = "${PWD}/docker/router.dockerfile"
7474
args = {
7575
RELEASE = "${RELEASE}"
7676
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/ARCHITECTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
![Design Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/kamilkisiela/graphql-hive/main/docs/architecture.puml)
66

77
Note: The relationships in this diagram is based on
8-
[this docker-compose](https://github.com/kamilkisiela/graphql-hive/blob/main/docker-compose.community.yml)
8+
[this docker-compose](https://github.com/kamilkisiela/graphql-hive/blob/main/docker/docker-compose.community.yml)

docs/TESTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ export DOCKER_TAG=":local"
3737
```
3838

3939
6. Compile a local Docker image by running:
40-
`docker buildx bake -f docker.hcl integration-tests --load`
40+
`docker buildx bake -f docker/docker.hcl integration-tests --load`
4141
7. Use Docker Compose to run the built containers (based on `community` compose file), along with
4242
the extra containers:
4343

4444
```
4545
export DOCKER_TAG=":local"
4646
export DOCKER_REGISTRY=""
4747
48-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
48+
docker compose -f ./docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
4949
```
5050

5151
8. Run the tests: `pnpm --filter integration-tests test:integration`
@@ -66,7 +66,7 @@ To run integration tests locally, from the pre-build Docker image, follow:
6666
export DOCKER_REGISTRY="ghcr.io/kamilkisiela/graphql-hive/"
6767
export DOCKER_TAG=":IMAGE_TAG_HERE"
6868
69-
docker compose -f docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
69+
docker compose -f ./docker/docker-compose.community.yml -f ./integration-tests/docker-compose.integration.yaml --env-file ./integration-tests/.env up -d --wait
7070
```
7171

7272
6. Run the tests: `pnpm --filter integration-tests test:integration`
@@ -95,9 +95,9 @@ export BUILD_TYPE=""
9595
export DOCKER_TAG=":local"
9696
```
9797

98-
6. Compile a local Docker image by running: `docker buildx bake -f docker.hcl build --load`
98+
6. Compile a local Docker image by running: `docker buildx bake -f docker/docker.hcl build --load`
9999
7. Run the e2e environment, by running:
100-
`docker compose -f docker-compose.community.yml --env-file ./integration-tests/.env up -d --wait`
100+
`docker compose -f ./docker/docker-compose.community.yml --env-file ./integration-tests/.env up -d --wait`
101101
8. Run Cypress: `pnpm test:e2e`
102102

103103
#### Running from pre-built Docker image
@@ -117,7 +117,7 @@ export DOCKER_TAG=":IMAGE_TAG_HERE"
117117
```
118118

119119
6. Run the e2e environment, by running:
120-
`docker compose -f docker-compose.community.yml --env-file ./integration-tests/.env up -d --wait`
120+
`docker compose -f ./docker/docker-compose.community.yml --env-file ./integration-tests/.env up -d --wait`
121121
7. Run Cypress: `pnpm test:e2e`
122122

123123
#### Docker Compose configuration

integration-tests/docker-compose.integration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Note: this is an overrides file for docker-compose.community.yml:
1+
# Note: this is an overrides file for ./docker/docker-compose.community.yml:
22
# It's used for setting special environment and configurations for running integration tests.
33
# This file also includes services that only exists in Hive's SaaS version, and are not available in the self-hosted version.
44
# Please refer to TESTING.md for more information.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
"build:libraries": "pnpm graphql:generate && pnpm turbo build --filter=./packages/libraries/* --color",
2424
"build:services": "pnpm turbo build --filter=./packages/services/**/* --color",
2525
"build:web": "pnpm turbo build --filter=./packages/web/* --color",
26-
"docker:build": "docker buildx bake -f docker.hcl --load build",
26+
"docker:build": "docker buildx bake -f docker/docker.hcl --load build",
2727
"env:sync": "node ./scripts/sync-env-files.js",
2828
"generate": "pnpm --filter @hive/storage db:generate && pnpm graphql:generate",
2929
"graphql:generate": "graphql-codegen",
3030
"lint": "eslint --cache --ignore-path .gitignore \"{packages,cypress}/**/*.{ts,tsx}\"",
3131
"lint:fix": "pnpm lint --fix",
3232
"lint:prettier": "prettier --cache --check .",
33-
"local:setup": "docker-compose -f docker-compose.dev.yml up -d --remove-orphans && pnpm --filter @hive/migrations db:init",
33+
"local:setup": "docker-compose -f ./docker/docker-compose.dev.yml up -d --remove-orphans && pnpm --filter @hive/migrations db:init",
3434
"postinstall": "node ./scripts/patch-manifests.js && pnpm env:sync && node ./scripts/turborepo-cleanup.js && node ./scripts/turborepo-setup.js",
3535
"pre-commit": "exit 0 && lint-staged",
3636
"prepare": "husky install",

packages/web/docs/src/pages/self-hosting/get-started.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ in less than 15 minutes.
4040
## Running GraphQL Hive
4141

4242
First download the `docker-compose.community.yml` file from the
43-
[GitHub repository](https://github.com/kamilkisiela/graphql-hive/blob/main/docker-compose.community.yml)
43+
[GitHub repository](https://github.com/kamilkisiela/graphql-hive/blob/main/docker/docker-compose.community.yml)
4444
using `wget`.
4545

4646
```bash
47-
wget https://raw.githubusercontent.com/kamilkisiela/graphql-hive/main/docker-compose.community.yml
47+
wget https://raw.githubusercontent.com/kamilkisiela/graphql-hive/main/docker/docker-compose.community.yml
4848
```
4949

5050
After downloading the file, you need to set some environment variables.

0 commit comments

Comments
 (0)