2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 12:10:25 +02: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 docker push offen/proxy:$DOCKER_IMAGE_TAG
deploy: deploy:
working_directory: ~/offen
docker: docker:
- image: circleci/golang:1.12 - image: docker:18-git
working_directory: ~/offen
steps: steps:
- checkout - 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: - run:
name: Define target environment name: Define target environment
command: | command: |
@ -81,17 +89,9 @@ jobs:
else else
echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV
fi 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: - run:
name: Run database migrations name: Run database migrations
command: | command: docker run -it offen/offen:latest migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
echo "TBD"
- run: - run:
name: Deploy name: Deploy
command: | command: |

View File

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

View File

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

View File

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

View File

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