mirror of
https://github.com/offen/website.git
synced 2024-11-22 09:00:28 +01:00
refer to correct docker images
This commit is contained in:
parent
76cf23ef97
commit
e98f3e5d73
@ -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: |
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"image": "offen/server:stable",
|
"image": "offen/offen:stable",
|
||||||
"essential": true,
|
"essential": true,
|
||||||
"memory": 256
|
"memory": 256
|
||||||
},
|
},
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"image": "offen/server:latest",
|
"image": "offen/offen:latest",
|
||||||
"essential": true,
|
"essential": true,
|
||||||
"memory": 256
|
"memory": 256
|
||||||
}
|
}
|
||||||
|
4
Makefile
4
Makefile
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user