Skip to content

MauMaGau/sticky.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New clone

Let's get docker up and running

$ cp .env.example .env
$ composer install
$ art key:generate
$ art migrate

Useful docker stuff

$ docker-compose up -d nginx mysql
$ docker-compose exec workspace bash
$ docker-compose exec nginx bash
$ docker-compose exec mysql bash
$ docker-compose down

$ docker exec -it [container process id] bash

Deploying to ecs

Install aws cli first - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html And create an IAM user with AdminstratorAccess

$ aws configure
$ (aws ecr get-login --no-include-email --region eu-west-1) > bash

Build images locally

$ docker build --file docker/nginx/Dockerfile -t sticky_nginx ./
$ docker build --file Dockerfile-ecs -t sticky_workspace_ecs ./

Create repositories for each image

$ ecs-cli push sticky_nginx
$ ecs-cli push sticky_workspace_ecs

Then put repo names in docker-compose-esc.yml

Create the cluster

$ ecs-cli up --launch-type FARGATE --cluster sticky # --force

Start the tasks

// Copy the 2 subnets and 1 security group created by Cloudformation to ecs-params.yml
$ ecs-cli compose --file docker-compose-ecs.yml --project-name sticky --ecs-params docker/ecs-params.yml up --launch-type FARGATE --create-log-groups

Add web traffic to security group

Via web ui for now

Useful

docker container ls docker ps docker images

Pull ECS images to develop locally

$ aws ecr get-login --region eu-west-1 --no-include-email > bash (or copy & paste if that doesnt work)
$ docker pull 292099829357.dkr.ecr.eu-west-1.amazonaws.com/sticky_workspace:latest

Delete all containers

docker rm $(docker ps -a -q)

Delete all images

docker rmi -f $(docker images -q)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors