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:
|
||||
- mysql
|
||||
volumes:
|
||||
- ~/astra-errors.log:/var/log/astra-errors.log
|
||||
- ~/astra-logs:/var/log
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
|
|
|
|||
|
|
@ -25,16 +25,20 @@ ENV PATH="/usr/local/cargo/bin:${PATH}"
|
|||
# Copy manifest files first to leverage Docker layer caching for dependencies
|
||||
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; \
|
||||
if [ -n "${RUSTUP_TOOLCHAIN}" ]; then \
|
||||
rustup toolchain install "${RUSTUP_TOOLCHAIN}" && \
|
||||
if ! rustup toolchain list | grep -q "^${RUSTUP_TOOLCHAIN}"; then \
|
||||
rustup toolchain install "${RUSTUP_TOOLCHAIN}"; \
|
||||
fi; \
|
||||
rustup default "${RUSTUP_TOOLCHAIN}"; \
|
||||
else \
|
||||
if [ -f rust-toolchain.toml ]; then \
|
||||
TOOLCHAIN=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml | head -n1); \
|
||||
if [ -n "$TOOLCHAIN" ]; then \
|
||||
rustup toolchain install "$TOOLCHAIN" && \
|
||||
if ! rustup toolchain list | grep -q "^$TOOLCHAIN"; then \
|
||||
rustup toolchain install "$TOOLCHAIN"; \
|
||||
fi; \
|
||||
rustup default "$TOOLCHAIN"; \
|
||||
fi; \
|
||||
fi; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue