PeaceSheep
PeaceSheep

Reputation: 69

docker-compose how to add multiple command?

I wrote "docker-compose.yml", and I want to execute two commands:
uwsgi -i /code/uwsgi.ini and python3.6 /code/manage.py collectstatic

I tried to use && to connect the two command, but it failed, what can I do?

Upvotes: 0

Views: 196

Answers (1)

Raj Srujan Jalem
Raj Srujan Jalem

Reputation: 661

You can execute multiple commands using bash -c:

command: >
    bash -c "uwsgi -i /code/uwsgi.ini
    && python3.6 /code/manage.py collectstatic"

Upvotes: 1

Related Questions