Setting up GCP Compute Engine
1. Prerequisites
You need to set up a GCP project and enable the Compute Engine API. This process can be easily performed in the GCP console.2. Creating an Instance
- Navigate to
Compute Engine>VM instancesmenu. - Click the
CREATE INSTANCEbutton. - Configure the following settings:
Name: Instance name (e.g., “a2-ce”)Region: Choose a nearby region (e.g., “asia-northeast3 (Seoul)”)Machine configuration>Machine type:- Recommend CPU 8 vCPU, memory 16GB or higher. (e.g., e2-standard-8)
- Click the
CHANGEbutton underBoot disk:Operating system: Select “Container Optimized OS”- Verify that the auto-selected
Versionis “x86/64” architecture - (optional) To preserve the disk permanently, select
Keep diskunderSHOW ADVANCED CONFIGURATION>Deletion rule - click the
SELECTbutton.
Firewall: CheckAllow HTTP trafficandAllow HTTPS traffic- Expand
Advanced options:Networking>Network tags: Enter “a2-ce”Networking>Network interfaces> Expanddefault>External IPv4 address: SelectRESERVE STATIC EXTERNAL IP ADDRESS- Enter “a2-ce” for
nameand clickRESERVE
- Enter “a2-ce” for
- Click the “CREATE” button at the bottom of the screen to create the instance.
3. Setting up Firewall Rules
- Go to
VPC network>Firewallmenu. - Click the
CREATE FIREWALL RULEbutton. - Configure the following settings:
Name: Specify a name for the rule (e.g., “allow-a2-ce”)Targets: SelectSpecified target tagsand enter the previously used tag (e.g., “a2-ce”)Source filter: SelectIPv4 rangesand enter “0.0.0.0/0” (allows access from all IPs)Protocols and ports: SelectSpecified protocols and ports, checkTCPand enter ports “8000,8080”
- Click the “CREATE” button to create the rule.
4. Deploying Docker Image
- Connect to the instance using the SSH button in the GCP console.
-
Install docker compose
-
Create a docker-compose.yml file:
-
Run docker compose:
5. Verifying the Service
- Open a web browser.
- Access
http://[YOUR_STATIC_EXTERNAL_IP]:8000. - Verify that the service is running normally.
Reference Images
- settings 1

- settings 2

- network

- firewall

By following this guide, you can successfully deploy A2 to GCP Compute Engine. If you need additional configuration or optimization, please refer to the GCP documentation or contact our support team anytime.
