2 years ago
Hi, I saw the new docker compose feature on the changelog.
I tried dragging and dropping a few docker-compose.yml files and I always get the same message:
"Error - Only YAML files are supported."
Is the feature working yet?
Are there any limitations related to the docker-compose.yml files that can be used?
I see that the docs haven't been updated yet (LINK)
Thanks for the awesome work!
Kind regards,
Leo
5 Replies
2 years ago
Even if it did accept your compose file, it's unlikely to be what you think it is, it is just going to help you scaffold a skeleton template and it will still require a lot of manual post processing (depending on how good your compose file is layed out)
If you share your compose file I'd be happy to help you manually deconstruct it.
2 years ago
Hey brody,
Thanks for the quick reply!
Here is the docker-compose.yml
version: "3.9"
name: myapp
services:
db:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=myapp
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
interval: 2s
retries: 10
redis:
image: redis
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: bash -c 'exec 6<>/dev/tcp/redis/6379'
interval: 2s
retries: 10
web:
build:
context: .
dockerfile: Dockerfile.web
target: development
volumes:
- .:/code
ports:
- "8000:8000"
env_file:
- ./.env.docker
restart: unless-stopped
depends_on:
db:
condition: service_healthy
celery:
build:
context: .
dockerfile: Dockerfile.celery
target: development
command: celery -A myapp worker --concurrency 4 -l INFO
volumes:
- .:/code
env_file:
- ./.env.docker
healthcheck:
test: celery -A myapp inspect ping
interval: 30s
timeout: 10s
retries: 3
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
postgres_data:
redis_data:
2 years ago
This is simple enough to deploy manually, here's a rough guide -
- Create a new empty project.
- Use the
+ Newbutton to deploy both a Postgres and Redis database. - Add an empty service to the project, this will be web.
- Set a
RAILWAY_DOCKERFILE_PATHservice variable to the name of your web dockerfile. - Set up any other variables you might need.
- Connect your repo.
- Add another empty service to the project, this will be celery.
- Same steps as above, you get the idea I'm sure!
- Generate domains for both services.
- Do any config that I forgot to mention.
- Profit!
2 years ago
Hey brody,
I was able to deploy manually. I just wanted to know if it was possible to do it with a simple drag and drop.
You you have an example of docker-compose.yml that I can use to test the drag and drop feature?
Or should I wait until the docs are available?
Thanks again for your time.
Kind regards,
Leo
2 years ago
is there any way to drag and drop docker-compose.yml for creating a template looks like it still doesn't work "Error - Only YAML files are supported."