###### tags: `らぁ〜めん京` # クラウド版 Odoo   ## 動作環境 Google Compute Engine(VM Instance): Instance Type : e2-small OS Version : Ubuntu 18.04 HTTP traffic : Allow --- ```shell= sh env-setup.sh ``` `env-setup.sh` ```shell= sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io sudo apt install docker-ce sudo apt-get install python3-pip sudo apt-get install libffi-dev libssl-dev sudo pip3 install -U docker-compose ``` [Ubuntu 用 Docker CE の入手](https://docs.docker.jp/engine/installation/linux/docker-ce/ubuntu.html) [【Docker】 ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?](https://qiita.com/dnnnn_yu/items/14a31721a2870b735938) ```shell= docker-compose build docker-compose up ``` `docker-compose.yml` ```yaml= version: '2' services: db: image: postgres:11 environment: - POSTGRES_PASSWORD=odoo - POSTGRES_USER=odoo - POSTGRES_DB=postgres restart: always # run as a service volumes: - ./postgresql:/var/lib/postgresql/data odoo13: image: odoo:13 depends_on: - db ports: - "8069:8069" tty: true command: -- --dev=reload # command: odoo scaffold /mnt/extra-addons/test_module volumes: - ./addons:/mnt/extra-addons - ./etc:/etc/odoo restart: always ``` ## EC2ベースECSによるOdooの起動 IAM > アクセス管理 > ユーザー選択 > 認証情報 > アクセスキーの作成 `aws configure` ### EC2クラスターを作成 クラスター名:xxxxx-cluster リージョン:ap-northeast-1 起動タイプ:EC2 ```shell= ecs-cli configure --cluster xxxxx-cluster --region ap-northeast-1 --default-launch-type EC2 ``` `INFO[0000] Saved ECS CLI cluster configuration default.` キーペアを用意しておく。 ```shell= ecs-cli up --keypair xxxxx-key --capability-iam --size 2 --instance-type t2.micro ``` 前回、別のクラスターを作っていたため、`--force`オプションを末尾に付け、上書きした。
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up