Reputation: 4130
I am using a publicly hosted docker project, but the documentation on running it with docker-compose is nonexistent.
Here is the docker run command:
docker run -d -v /persist/gravsite:/apps/var garywiz/docker-grav \
--create-user anyuser:/apps/var
What I need to know is the equivalent for the --create-user
in the docker-compose.yml
file.
Here is my current entry:
grav:
image: garywiz/docker-grav
container_name: grav
restart: always
user: gravuser
environment:
- VIRTUAL_HOST=www.domain.com,domain.com
- VIRTUAL_PORT=8080
volumes:
- /home/gravuser:/apps/var
Thanks for any help.
Upvotes: 0
Views: 1631
Reputation: 1695
If you want to translate the execution of the command in docker-compose, it would look like this:
this command:
docker run -d -v /persist/gravsite:/apps/var garywiz/docker-grav \
--create-user anyuser:/apps/var
is equivalent to:
grav:
image: garywiz/docker-grav
volumes:
- /persist/gravsite:/apps/var
command: --create-user anyuser:/apps/var
Upvotes: 1