2
0
mirror of https://github.com/offen/website.git synced 2024-12-22 21:10:23 +01:00

refer to correct docker images

This commit is contained in:
Frederik Ring 2019-10-10 09:25:16 +02:00
parent 76cf23ef97
commit e98f3e5d73
5 changed files with 17 additions and 15 deletions

View File

@ -68,11 +68,19 @@ jobs:
docker push offen/proxy:$DOCKER_IMAGE_TAG
deploy:
working_directory: ~/offen
docker:
- image: circleci/golang:1.12
- image: docker:18-git
working_directory: ~/offen
steps:
- checkout
- setup_remote_docker
- run:
name: Install deployment dependencies
command: |
sudo apt-get update && sudo apt-get install -qq -y python-pip libpython-dev
curl -O https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
sudo pip install -q awscli --upgrade
sudo pip install awsebcli --upgrade
- run:
name: Define target environment
command: |
@ -81,17 +89,9 @@ jobs:
else
echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV
fi
- run:
name: Install deployment dependencies
command: |
sudo apt-get update && sudo apt-get install -qq -y python-pip libpython-dev
curl -O https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
sudo pip install -q awscli --upgrade
sudo pip install awsebcli --upgrade
- run:
name: Run database migrations
command: |
echo "TBD"
command: docker run -it offen/offen:latest migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
- run:
name: Deploy
command: |

View File

@ -30,7 +30,7 @@
},
{
"name": "server",
"image": "offen/server:stable",
"image": "offen/offen:stable",
"essential": true,
"memory": 256
},

View File

@ -23,7 +23,7 @@
},
{
"name": "server",
"image": "offen/server:latest",
"image": "offen/offen:latest",
"essential": true,
"memory": 256
}

View File

@ -17,7 +17,7 @@ dev-build:
howto:
@echo "Successfully built containers and installed dependencies."
@echo "If this is your initial setup, you can run 'make bootstrap' next"
@echo "to create seed the database."
@echo "to create and seed the database."
bootstrap:
@echo "Bootstrapping Server service ..."
@ -32,6 +32,8 @@ bootstrap:
update:
@echo "Installing / updating dependencies ..."
@docker-compose run homepage pip install --user -r requirements.txt
@echo "Applying pending database migrations ..."
@docker-compose run server migrate
DOCKER_IMAGE_TAG ?= latest
ROBOTS_FILE ?= robots.txt.staging

View File

@ -12,7 +12,7 @@ services:
- server
server:
image: offen/server:latest
image: offen/offen:latest
command: serve
volumes:
- ./bootstrap.yml:/bootstrap.yml