Skip to content

Commit

Permalink
Copy env > .env file before running test container
Browse files Browse the repository at this point in the history
It needs the .env file to get the variables instead of getting
from the environment variables
  • Loading branch information
anarute committed Oct 11, 2023
1 parent 0a6d952 commit c00a8ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docker/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ services:
build:
context: ../
dockerfile: docker/dev.app.Dockerfile
env_file:
- ../.env.test
container_name: phpreport-app
command: bash -c "cp .env.test .env && php -S 0.0.0.0:8000"
ports:
Expand All @@ -29,7 +27,8 @@ services:
dockerfile: docker/dev.api.Dockerfile
container_name: phpreport-api
env_file:
- ../.env.test
- ../.env
command: bash -c "env > .env && uvicorn main:app --host 0.0.0.0 --port 8555"
ports:
- "8555:8555"
depends_on:
Expand Down

0 comments on commit c00a8ff

Please sign in to comment.