mirror of
https://github.com/bitnami/containers.git
synced 2026-02-19 22:17:24 +08:00
Pasting files in root dir
This commit is contained in:
@@ -38,6 +38,7 @@ ENV RAILS_ENV=development
|
||||
ENV BITNAMI_APP_NAME=rails
|
||||
ENV BITNAMI_IMAGE_VERSION=4.2.6-r0
|
||||
|
||||
USER bitnami
|
||||
WORKDIR /app
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
# bitnami-docker-rails
|
||||
|
||||
WIP
|
||||
|
||||
DO not run the docker-compose up in this directory, .gitignores will
|
||||
conflict
|
||||
|
||||
@@ -8,17 +8,13 @@ services:
|
||||
mariadb:
|
||||
tty: true
|
||||
image: bitnami/mariadb:latest
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=
|
||||
- MARIADB_USER=
|
||||
- MARIADB_PASSWORD=
|
||||
- MARIADB_DATABASE=
|
||||
volumes:
|
||||
- mariadb-data:/bitnami/mariadb
|
||||
|
||||
myapp:
|
||||
tty: true
|
||||
build: .
|
||||
# build: .
|
||||
image: gcr.io/bitnami-containers/rails:4.2.6-r1
|
||||
environment:
|
||||
- DATABASE_URL=mysql2://mariadb/my_app_development
|
||||
depends_on:
|
||||
@@ -26,4 +22,4 @@ services:
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- ./app:/app
|
||||
- .:/app
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
INIT_SEM=/tmp/initialized.sem
|
||||
GEMFILE=/app/Gemfile
|
||||
|
||||
fresh_container() {
|
||||
[ ! -f $INIT_SEM ]
|
||||
}
|
||||
@@ -24,8 +25,8 @@ wait_for_db() {
|
||||
log "Error: Couldn't connect to mariadb."
|
||||
exit 1
|
||||
fi
|
||||
log "Still trying to connect to mariadb at $mariadb_address. Attempt $counter."
|
||||
sleep 2
|
||||
log "Trying to connect to mariadb at $mariadb_address. Attempt $counter."
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
@@ -42,7 +43,7 @@ log () {
|
||||
|
||||
if ! app_present; then
|
||||
log "Creating rails application"
|
||||
rails new . --skip-bundle --database mysql --quiet
|
||||
rails new . --skip-bundle --database mysql
|
||||
fi
|
||||
|
||||
if ! gems_up_to_date; then
|
||||
|
||||
Reference in New Issue
Block a user