We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cat <<EOF >> Dockerfile FROM ruby:3-alpine3.13 EXPOSE 3000 RUN apk add --update \ build-base \ mariadb-dev \ nodejs yarn \ tzdata \ && rm -rf /var/cache/apk/* RUN mkdir -p /app WORKDIR /app VOLUME /app ADD Dockerfile /Dockerfile CMD ["sh", "-c", "env >> /etc/environment ; tail -f /dev/null"] EOF # docker-compose.yml cat <<EOF >> docker-compose.yml version: "3" services: mysql: image: mysql:8.0 environment: - MYSQL_ROOT_PASSWORD=root volumes: - "mysql_data:/var/lib/mysql" - ".:/app" main: build: . ports: - "3000:3000" volumes: - ".:/app" - "ruby_bundle:/usr/local/bundle" - "~/.ssh/id_rsa:/root/.ssh/id_rsa" depends_on: - mysql volumes: mysql_data: EOF docker-compose up -d docker-compose exec main sh -c "gem install rails" docker-compose exec main sh -c "rails new . -d mysql" vim database.yml docker-compose exec main sh -c "rake db:create" docker-compose exec main sh -c "rails s -b 0.0.0.0" # 可能用到 # docker-compose exec main sh -c "bundle" # docker-compose exec main sh -c "rails webpacker:install"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: