Skip to content

Commit 8078d2a

Browse files
committed
Refactor: Change "/usr/src/" to "/usr/local/src/".
1 parent 2b688cd commit 8078d2a

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ docker compose exec chloria-backend bash
2121

2222
Create a dummy token file for retrieving MinIO web identity (it's ok to leave this file empty):
2323
```bash
24-
mkdir -p /usr/src/chloria/storage/chloria-backend/
25-
touch /usr/src/chloria/storage/chloria-backend/token
24+
mkdir -p /usr/local/src/chloria/storage/chloria-backend/
25+
touch /usr/local/src/chloria/storage/chloria-backend/token
2626
```

chloria-backend/Dockerfile.dist-api

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Build
22
FROM rust:1.84.0-bookworm AS build
33

4-
COPY . /usr/src/chloria-backend/
4+
COPY . /usr/local/src/chloria-backend/
55

6-
WORKDIR /usr/src/chloria-backend/
6+
WORKDIR /usr/local/src/chloria-backend/
77

88
RUN cargo install diesel_cli@2.2.7 --no-default-features --features postgres
99
RUN cargo build --release --package chloria-api
@@ -14,4 +14,4 @@ FROM debian:bookworm-20250203-slim
1414
RUN apt update -y && \
1515
apt install -y libpq5
1616

17-
COPY --from=build /usr/src/chloria-backend/target/release/chloria-api /bin/chloria-api
17+
COPY --from=build /usr/local/src/chloria-backend/target/release/chloria-api /bin/chloria-api

chloria-backend/Dockerfile.dist-job

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Build
22
FROM rust:1.84.0-bookworm AS build
33

4-
COPY . /usr/src/chloria-backend/
4+
COPY . /usr/local/src/chloria-backend/
55

6-
WORKDIR /usr/src/chloria-backend/
6+
WORKDIR /usr/local/src/chloria-backend/
77

88
RUN cargo install diesel_cli@2.2.7 --no-default-features --features postgres
99
RUN cargo build --release --package chloria-job
@@ -14,4 +14,4 @@ FROM debian:bookworm-20250203-slim
1414
RUN apt update -y && \
1515
apt install -y libpq5 ca-certificates
1616

17-
COPY --from=build /usr/src/chloria-backend/target/release/chloria-job /bin/chloria-job
17+
COPY --from=build /usr/local/src/chloria-backend/target/release/chloria-job /bin/chloria-job

chloria-backend/Dockerfile.dist-migration

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt update -y && \
1010
apt install -y libpq5
1111

1212
COPY --from=build /usr/local/cargo/bin/diesel /bin/diesel
13-
COPY ./migrations /usr/src/migrations
13+
COPY ./migrations /usr/local/src/migrations
1414

1515
# Ref: https://github.com/diesel-rs/diesel/blob/v2.2.7/diesel_cli/src/migrations/mod.rs#L287
16-
ENV MIGRATION_DIRECTORY /usr/src/migrations
16+
ENV MIGRATION_DIRECTORY /usr/local/src/migrations

deployment-local/compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ services:
1111
- MINIO_TENANT_ROOT_USER=${MINIO_TENANT_ROOT_USER}
1212
- MINIO_TENANT_ROOT_PASSWORD=${MINIO_TENANT_ROOT_PASSWORD}
1313
- CHLORIA_ORIGIN_BUCKET_NAME=origin
14-
- POETRY_CACHE_DIR=/usr/src/chloria/storage/minio-operator/cache/pypoetry
14+
- POETRY_CACHE_DIR=/usr/local/src/chloria/storage/minio-operator/cache/pypoetry
1515
volumes:
16-
- ../:/usr/src/chloria/
16+
- ../:/usr/local/src/chloria/
1717
tty: true
18-
working_dir: /usr/src/chloria/minio-operator/
18+
working_dir: /usr/local/src/chloria/minio-operator/
1919
minio-tenant:
2020
build:
2121
context: ../minio-tenant/
@@ -51,7 +51,7 @@ services:
5151
- MINIO_OPERATOR_STS_ENDPOINT=http://minio-operator:4223
5252
# - MINIO_OPERATOR_CACERT_FILE= # We don't need this env var in local since STS endpoint is HTTP
5353
- MINIO_TENANT_ENDPOINT=http://minio-tenant:9000
54-
- MINIO_WEB_IDENTITY_TOKEN_FILE=/usr/src/chloria/storage/chloria-backend/token
54+
- MINIO_WEB_IDENTITY_TOKEN_FILE=/usr/local/src/chloria/storage/chloria-backend/token
5555
- DATABASE_URL=postgres://${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}@postgresql/${POSTGRESQL_DB}
5656
# Chloria job
5757
- CHLORIA_NEWS_FETCHERS=yahoo
@@ -65,6 +65,6 @@ services:
6565
- CHLORIA_CASE_PERMITS_NUM=10
6666
- CHLORIA_LOG_LEVEL=info
6767
volumes:
68-
- ../:/usr/src/chloria/
68+
- ../:/usr/local/src/chloria/
6969
tty: true
70-
working_dir: /usr/src/chloria/chloria-backend/
70+
working_dir: /usr/local/src/chloria/chloria-backend/

minio-operator/Dockerfile.local

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt install -y pipx && \
77
ENV HOME=/root
88
ENV PATH="$HOME/.local/bin:$PATH"
99

10-
COPY run.sh /usr/src/run.sh
11-
RUN chmod +x /usr/src/run.sh
10+
COPY run.sh /usr/local/src/run.sh
11+
RUN chmod +x /usr/local/src/run.sh
1212

13-
CMD /usr/src/run.sh
13+
CMD /usr/local/src/run.sh

minio-tenant/Dockerfile.local

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Ref: https://github.com/minio/operator/blob/v6.0.4/helm/tenant/values.yaml#L32-L33
22
FROM quay.io/minio/minio:RELEASE.2024-10-02T17-50-41Z
33

4-
COPY setup-buckets.sh /usr/src/setup-buckets.sh
5-
RUN chmod +x /usr/src/setup-buckets.sh
4+
COPY setup-buckets.sh /usr/local/src/setup-buckets.sh
5+
RUN chmod +x /usr/local/src/setup-buckets.sh
66

77
ENTRYPOINT []
8-
CMD bash -c "sleep 1 && /usr/src/setup-buckets.sh" & minio server /data
8+
CMD bash -c "sleep 1 && /usr/local/src/setup-buckets.sh" & minio server /data

0 commit comments

Comments
 (0)