forked from kubicek/bullet_train_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
31 lines (22 loc) · 849 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
DOCKER_REPO="https://raw.githubusercontent.com/alsted/bullet_train_docker/main"
echo "alsted fork"
# install and execute and alternate configuration script
curl -o "bin/configure" "$DOCKER_REPO/bin/configure"
bin/configure
# install docker configuration
curl -o "Dockerfile" "$DOCKER_REPO/Dockerfile"
curl -o "docker-compose.yml" "$DOCKER_REPO/docker-compose.yml"
curl -o "bin/docker-entrypoint-web" "$DOCKER_REPO/docker-entrypoint-web"
# puma should not listen to localhost only
sed -i '' 's/-p 3000/-p 3000 -b 0.0.0.0/' Procfile.dev
#set 755 on entrypoint
chmod 755 bin/docker-entrypoint-web
# commit changes
git fetch
git add .
git commit origin -m "Added docker"
# build image
docker compose build
# replay instructions from configure
echo "Next you can run `docker compose run web bin/setup` and then `docker compose up`."