Correct log implementations
This commit is contained in:
parent
17679c609e
commit
88f79356f2
2 changed files with 16 additions and 12 deletions
|
|
@ -20,7 +20,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
volumes:
|
volumes:
|
||||||
- ~/astra-errors.log:/var/log/astra-errors.log
|
- ~/astra-logs:/var/log
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
|
|
|
||||||
|
|
@ -25,21 +25,25 @@ ENV PATH="/usr/local/cargo/bin:${PATH}"
|
||||||
# Copy manifest files first to leverage Docker layer caching for dependencies
|
# Copy manifest files first to leverage Docker layer caching for dependencies
|
||||||
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
|
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
|
||||||
|
|
||||||
# Ensure the pinned toolchain from rust-toolchain.toml (or provided ARG) is installed in a cacheable layer
|
# Ensure the pinned toolchain from rust-toolchain.toml (or provided ARG) is installed only if missing
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
if [ -n "${RUSTUP_TOOLCHAIN}" ]; then \
|
if [ -n "${RUSTUP_TOOLCHAIN}" ]; then \
|
||||||
rustup toolchain install "${RUSTUP_TOOLCHAIN}" && \
|
if ! rustup toolchain list | grep -q "^${RUSTUP_TOOLCHAIN}"; then \
|
||||||
rustup default "${RUSTUP_TOOLCHAIN}"; \
|
rustup toolchain install "${RUSTUP_TOOLCHAIN}"; \
|
||||||
else \
|
fi; \
|
||||||
if [ -f rust-toolchain.toml ]; then \
|
rustup default "${RUSTUP_TOOLCHAIN}"; \
|
||||||
TOOLCHAIN=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml | head -n1); \
|
else \
|
||||||
if [ -n "$TOOLCHAIN" ]; then \
|
if [ -f rust-toolchain.toml ]; then \
|
||||||
rustup toolchain install "$TOOLCHAIN" && \
|
TOOLCHAIN=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml | head -n1); \
|
||||||
rustup default "$TOOLCHAIN"; \
|
if [ -n "$TOOLCHAIN" ]; then \
|
||||||
|
if ! rustup toolchain list | grep -q "^$TOOLCHAIN"; then \
|
||||||
|
rustup toolchain install "$TOOLCHAIN"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
rustup default "$TOOLCHAIN"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi; \
|
fi; \
|
||||||
rustup show active-toolchain || true
|
fi; \
|
||||||
|
rustup show active-toolchain || true
|
||||||
|
|
||||||
# Create a dummy src to allow cargo to download dependencies into the cache layer
|
# Create a dummy src to allow cargo to download dependencies into the cache layer
|
||||||
RUN mkdir -p src && echo "fn main() { println!(\"cargo cache build\"); }" > src/main.rs
|
RUN mkdir -p src && echo "fn main() { println!(\"cargo cache build\"); }" > src/main.rs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue