mirror of https://github.com/buster-so/buster.git
Refactor Docker Compose and API Dockerfile for improved environment handling
- Removed version specification from `docker-compose.yml` for simplicity. - Eliminated the `env_file` directive in the `web` service to streamline environment variable management. - Updated the `Dockerfile` for the API to conditionally copy SSL certificates based on the environment, enhancing flexibility for local and production setups. These changes aim to simplify the configuration and improve the development workflow.
This commit is contained in:
parent
f88288cc55
commit
176d5eb06b
|
@ -22,8 +22,11 @@ RUN apt-get update && apt-get install -y \
|
||||||
&& update-ca-certificates \
|
&& update-ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY cert.pem /usr/local/share/ca-certificates/cert.crt
|
ARG ENVIRONMENT=local
|
||||||
RUN update-ca-certificates
|
RUN if [ "$ENVIRONMENT" != "local" ]; then \
|
||||||
|
COPY cert.pem /usr/local/share/ca-certificates/cert.crt && \
|
||||||
|
update-ca-certificates; \
|
||||||
|
fi
|
||||||
|
|
||||||
COPY --from=builder /app/target/release/bi_api .
|
COPY --from=builder /app/target/release/bi_api .
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: supabase/postgres:15.1.0.117
|
image: supabase/postgres:15.1.0.117
|
||||||
|
@ -31,8 +29,6 @@ services:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
env_file:
|
|
||||||
- ./web/.env
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue