initial repo

This commit is contained in:
Josh Burman 2021-08-09 17:50:16 -04:00
commit 4975ab5b2c
10 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,13 @@
FROM python:3.9.6
RUN mkdir /app
WORKDIR /app
RUN python -m pip install pulp
RUN svn checkout https://projects.coin-or.org/svn/Cbc/releases/2.9.8 Cbc-2.9.8
RUN cd Cbc-2.9.8 && \
./configure && \
make && \
make install
CMD tail -f /dev/null

0
.dockerignore Normal file
View File

0
.gitignore vendored Normal file
View File

50
.vagrantrc Normal file
View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
. $MEASURE_SRC_PATH/.vagrantrc
[ ! -f docker-compose.override.yml ] && cat <<YAML > docker-compose.override.yml
override_file_placeholder:
image: busybox
YAML
measure-vagrant-id() {
vagrant global-status | grep 'yardstick\s*$' | awk '{ print $1 }'
}
vagrant-shell() {
vagrant ssh `measure-vagrant-id`
}
vagrant-ssh() {
vagrant ssh `measure-vagrant-id` -c "$*"
}
compose() {
vagrant-ssh "cd /apps/measure-solver && \\
docker-compose -f '/app/docker-compose.yml' \\
-f '/apps/measure-solver/docker-compose.yml' \\
-f '/apps/measure-solver/docker-compose.override.yml' \\
$*"
}
run() {
compose "run --rm measure-solver $*"
}
run-script() {
run "rails $*"
}
measure-solver-logs() {
compose "logs measure-solver"
}
measure-solver-server() {
}
restart-measure-solver() {
}
rails() {
run-script "$*"
}

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.9.6
RUN mkdir /app
WORKDIR /app
RUN python -m pip install pulp
RUN svn checkout https://projects.coin-or.org/svn/Cbc/releases/2.9.8 Cbc-2.9.8
RUN cd Cbc-2.9.8 && \
./configure && \
make && \
make install
CMD tail -f /dev/null

0
Makefile Normal file
View File

View File

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
measure-solver:
build: /apps/measure-solver/.docker-compose
environment:
VIRTUAL_HOST: yssolver.localhost
MEASURE_BASE_URL: http://admin.localhost
dns:
- 172.17.0.1
volumes:
- /apps/measure-solver:/app

1
docker_tag.txt Normal file
View File

@ -0,0 +1 @@
0.1

9
rc Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
export MEASURE_SRC_PATH=../yardstick
if [ -f .user_rc ]; then
. .user_rc
fi
source .vagrantrc